2026-11-19 13:37:08 +00:00
using System.Collections.Generic ;
using System.Globalization ;
using UnityEngine ;
using UnityEngine.UI ;
namespace TKS.OutGame
{
/// <summary>
/// 출석부 쪽(시안 mock_event_7 · mock_event_14 = build_mock_e.py screen · banner_card · board · day_cell · final_cell) —
/// 위 탭 2(오픈 기념 출석부 · 일일 출석부 · 화면 폭 반씩) · 배너(글자 없는 그림 + 게임 글자: 꼬리표 · 제목 · 특별 보상 · 남은 기간) · 나무 출석판(걸이 목패 칸 · 받은 날 = 「출석」 도장 · 받을 칸 = 금빛 + 받기 · 마지막 날 = 금 큰 칸).
/// </summary>
public partial class EventScreen
{
string attEv = "" ;
/// <summary>지금 보는 출석부(att7 · att14).</summary>
public string AttendEvent
{
get { return attEv ; }
}
string [ ] AttRow ( string ev )
{
foreach ( var r in tb . All ( "att_ev" ) )
if ( Str ( r , 0 ) = = ev ) return r ;
return null ;
}
/// <summary>출석부 고르기(테스트 · 위 탭).</summary>
public void ShowAttend ( string ev )
{
attEv = ev ;
ShowPage ( PageAttend ) ;
}
void PickAttend ( )
{
var tabs = L ( "att_tabs" ) ;
if ( attEv . Length > 0 & & System . Array . IndexOf ( tabs , attEv ) > = 0 ) return ;
attEv = Str ( tabs , 0 ) ;
// 오픈 기념이 끝났으면 일일
if ( ! EventRules . AttActive ( S . Save , attEv , S . Now ) & & tabs . Length > 1 ) attEv = Str ( tabs , 1 ) ;
}
// ---------- 판 배치(시안 board() 그대로 · Art · Info 공용) ----------
struct AttLay
{
public float x0 , x1 , y0 , y1 , ix0 , ix1 , iy0 , iy1 , lx , top , cw , ch , gx , gy ;
public int cols , rows ;
}
AttLay AttLayout ( string [ ] ev )
{
var B = L ( "board" ) ;
var a = new AttLay ( ) ;
a . x0 = At ( B , 0 ) ;
a . x1 = 1080f - At ( B , 0 ) ;
a . y0 = At ( B , 1 ) ;
a . y1 = At ( B , 2 ) + Extra ; // 긴 화면 = 판이 아래로 늘어남
float inset = At ( B , 8 ) , pad = At ( B , 3 ) , topPad = At ( B , 4 ) ;
a . ix0 = a . x0 + inset ;
a . ix1 = a . x1 - inset ;
a . iy0 = a . y0 + inset ;
a . iy1 = a . y1 - inset ;
int cols0 = Mathf . RoundToInt ( At ( ev , 7 ) ) , rows0 = Mathf . RoundToInt ( At ( ev , 8 ) ) ;
float gx0 = At ( ev , 9 ) , gy0 = At ( ev , 10 ) ;
float cw0 = Mathf . Floor ( ( ( a . x1 - a . x0 - 2f * inset ) - 2f * pad - ( cols0 - 1 ) * gx0 ) / cols0 ) ;
float footH = Str ( ev , 12 ) . Length > 0 ? At ( B , 5 ) : 0f ;
float availH = ( a . y1 - a . y0 ) - 2f * inset - topPad - footH ;
var pq = Sp ( S_ ( "plaque" ) ) ;
float asp = pq ! = null ? pq . rect . height / pq . rect . width : 1.45f ;
float rowH = ( availH - ( rows0 - 1 ) * gy0 ) / rows0 ;
float cw , ch ;
if ( cw0 * asp < = rowH )
{
cw = cw0 ;
ch = Mathf . Floor ( cw0 * asp ) ;
}
else // 목패를 세로로 최대 max_squash 만큼 눌러 칸 폭을 지킴
{
ch = Mathf . Floor ( rowH ) ;
cw = Mathf . Floor ( Mathf . Min ( cw0 , rowH / ( asp * ( 1f - At ( B , 7 ) ) ) ) ) ;
}
float room = availH - rows0 * ch ;
float fillGy = rows0 > 1 ? Mathf . Max ( gy0 , Mathf . Floor ( room / ( rows0 - 1 ) ) ) : gy0 ;
a . cols = cols0 ;
a . rows = rows0 ;
a . gx = gx0 ;
a . gy = Mathf . Min ( fillGy , At ( B , 6 ) ) ;
a . cw = cw ;
a . ch = ch ;
a . lx = a . ix0 + Mathf . Floor ( ( ( a . ix1 - a . ix0 ) - ( cols0 * cw + ( cols0 - 1 ) * gx0 ) ) * 0.5f ) ;
a . top = a . iy0 + topPad ;
return a ;
}
// ---------- Art(Static) ----------
void AttendArt ( )
{
PickAttend ( ) ;
var ev = AttRow ( attEv ) ;
if ( ev = = null ) return ;
var ab = L ( "att_banner" ) ;
Img ( art , "Banner" , Sp ( Str ( ev , 1 ) ) , At ( ab , 0 ) , At ( ab , 1 ) , At ( ab , 2 ) , At ( ab , 3 ) , Color . white ) ;
var a = AttLayout ( ev ) ;
var bc = L ( "board_col" ) ;
Box ( art , "BoardFrame" , "card" , Col ( bc , 0 ) , a . x0 , a . y0 , a . x1 - a . x0 , a . y1 - a . y0 ) ;
Box ( art , "BoardInner" , "soft" , Col ( bc , 2 ) , a . ix0 , a . iy0 , a . ix1 - a . ix0 , a . iy1 - a . iy0 ) ;
for ( int k = 1 ; k < 9 ; k + + ) // 나무 결(세로 판자 이음)
Solid ( art , "Grain" + k , Col ( bc , 3 ) , a . ix0 + ( a . ix1 - a . ix0 ) * k / 9f - 1.5f , a . iy0 + 6f , 3f , a . iy1 - a . iy0 - 12f ) ;
for ( int r = 0 ; r < a . rows ; r + + ) // 걸이 줄(행마다)
Solid ( art , "Rail" + r , Col ( bc , 4 ) , a . ix0 + 8f , a . top + r * ( a . ch + a . gy ) + a . ch * 0.06f , a . ix1 - a . ix0 - 16f , 10f ) ;
// 위 현판(출석부 제목)
var bs = L ( "board_sign" ) ;
var sg = Sp ( S_ ( "sign" ) ) ;
float sw = At ( bs , 0 ) , sh = sg ! = null ? sw * sg . rect . height / sg . rect . width : sw * 0.25f ;
Img ( art , "BoardSign" , sg , 540f - sw * 0.5f , a . y0 - sh * 0.5f + At ( bs , 4 ) , sw , sh , Color . white ) ;
Lab ( art , "BoardTitle" , T ( Str ( ev , 11 ) ) , At ( bs , 1 ) , Col ( bs , 2 ) , 'm' , 540f , a . y0 + At ( bs , 4 ) + 2f , Col ( bs , 3 ) , 3f ) ;
if ( Str ( ev , 12 ) . Length > 0 )
{
var bf = L ( "board_foot" ) ;
Lab ( art , "BoardFoot" , T ( Str ( ev , 12 ) ) , At ( bf , 0 ) , Col ( bf , 1 ) , 'm' , 540f , a . iy1 - At ( bf , 3 ) , Col ( bf , 2 ) , 2f ) ;
}
}
// ---------- Info(Event) ----------
void AttendInfo ( )
{
var ev = AttRow ( attEv ) ;
if ( ev = = null ) return ;
var d = S . Save ;
var now = S . Now ;
AttTabs ( ) ;
AttBannerInfo ( ev , d , now ) ;
var a = AttLayout ( ev ) ;
var days = EventData . Attend ( attEv ) ;
int got = EventRules . AttGot ( d , attEv ) ;
int next = EventRules . AttClaimable ( d , attEv , now ) ;
for ( int day = 1 ; day < days . Count ; day + + )
{
int i = day - 1 ;
int c = i % a . cols , r = i / a . cols ;
float x = a . lx + c * ( a . cw + a . gx ) , y = a . top + r * ( a . ch + a . gy ) ;
DayCell ( days [ i ] , x , y , a . cw , a . ch , day = = next , day < = got ) ;
}
if ( days . Count > 0 )
{
int i = days . Count - 1 ;
int c = i % a . cols , r = i / a . cols ;
float x = a . lx + c * ( a . cw + a . gx ) , y = a . top + r * ( a . ch + a . gy ) ;
float fw = a . cw * 2f + a . gx , fh = Mathf . Floor ( a . ch * N ( "final" , 0 ) ) ;
FinalCell ( days [ i ] , x , y + Mathf . Floor ( ( a . ch - fh ) * 0.5f ) + N ( "final" , 1 ) , fw , fh , days . Count = = next , days . Count < = got ) ;
}
}
/// <summary>위 탭 2(화면 폭 반씩 · 고른 탭 = 붉은 + 윗면 광택 · 받을 칸 있는 다른 탭 = 붉은 점).</summary>
void AttTabs ( )
{
var tabs = L ( "att_tabs" ) ;
var at = L ( "att_tab" ) ;
var ac = L ( "att_tab_col" ) ;
float x = At ( at , 0 ) , y = At ( at , 1 ) , h = At ( at , 2 ) , gap = At ( at , 3 ) ;
float tw = Mathf . Floor ( ( 1080f - 2f * x - gap * ( tabs . Length - 1 ) ) / tabs . Length ) ;
for ( int k = 0 ; k < tabs . Length ; k + + )
{
string id = tabs [ k ] ;
var ev = AttRow ( id ) ;
bool on = id = = attEv ;
var img = Box ( info , "AttTab_" + id , "card" , Col ( ac , on ? 0 : 1 ) , x , y , tw , h ) ;
img . raycastTarget = true ;
string evId = id ;
img . gameObject . AddComponent < Button > ( ) . onClick . AddListener ( ( ) = >
{
if ( evId ! = attEv ) ShowAttend ( evId ) ;
} ) ;
if ( on ) Box ( img . transform , "Gloss" , "soft" , A ( Color . white , At ( ac , 5 ) ) , 10f , 8f , tw - 20f , 12f ) ;
Lab ( img . transform , "AttTabText_" + id , ev ! = null ? T ( Str ( ev , 2 ) ) : id , At ( at , 4 ) , Col ( ac , on ? 2 : 3 ) , 'm' , tw * 0.5f , h * 0.5f + 2f , Col ( ac , 4 ) , 3f ) ;
if ( ! on & & EventRules . AttClaimable ( S . Save , id , S . Now ) > 0 ) RedDot ( img . transform , tw - 12f , 4f , N ( "red_dot" , 2 ) ) ;
x + = tw + gap ;
}
}
/// <summary>배너 위 글자(시안 banner_card 2차 · 그림에 글자 0) — 꼬리표(현판 · 띠지) · 제목 · 특별 보상 · 마지막 날 보상(영웅 = 별 + 「3성 유비」 · 아니면 아이콘 줄) · 남은 기간.</summary>
void AttBannerInfo ( string [ ] ev , SaveData d , System . DateTime now )
{
var ab = L ( "att_banner" ) ;
var P = L ( "pickup" ) ;
var pc = L ( "pickup_col" ) ;
var b = UiKit . At ( info , "BannerInfo" , At ( ab , 0 ) , At ( ab , 1 ) , At ( ab , 2 ) , At ( ab , 3 ) ) ;
float H = At ( ab , 3 ) ;
float x = At ( P , 0 ) , y = At ( P , 1 ) ;
if ( Str ( ev , 4 ) = = "sign" ) // 오픈 기념 = 현판 꼬리표
{
var sg = Sp ( S_ ( "sign" ) ) ;
float tw = At ( P , 2 ) , th = sg ! = null ? tw * sg . rect . height / sg . rect . width : tw * 0.25f ;
Img ( b , "TagSign" , sg , x - 8f , y , tw , th , Color . white ) ;
Lab ( b , "AttTag" , T ( Str ( ev , 3 ) ) , th * 0.42f , Color . white , 'm' , x - 8f + tw * 0.5f , y + th * 0.5f , Col ( pc , 7 ) , 3f ) ;
y + = th + At ( P , 3 ) ;
}
else if ( Str ( ev , 4 ) = = "ribbon" ) // 상시 = 천 띠(오른쪽 제비꼬리)
{
float rw = At ( P , 13 ) , rh = At ( P , 14 ) ;
Img ( b , "TagRibbon" , Sp ( S_ ( "ribbon_fill" ) ) , x - 10f , y , rw + 8f , rh + 8f , Col ( ev , 13 ) ) ;
Img ( b , "TagRibbonLine" , Sp ( S_ ( "ribbon_line" ) ) , x - 10f , y , rw + 8f , rh + 8f , Col ( pc , 5 ) ) ;
Lab ( b , "AttTag" , T ( Str ( ev , 3 ) ) , rh * 0.56f , Color . white , 'm' , x - 6f + ( rw - rh * 0.35f ) * 0.5f , y + 4f + rh * 0.5f + 1f , Col ( pc , 6 ) , 3f ) ;
y + = rh + At ( P , 3 ) + 6f ;
}
Lab ( b , "AttTitle" , T ( Str ( ev , 5 ) ) , At ( P , 4 ) , Col ( pc , 0 ) , 'l' , x , y + At ( P , 4 ) * 0.5f , Col ( pc , 1 ) , 6f ) ;
y + = At ( P , 4 ) + At ( P , 5 ) ;
var days = EventData . Attend ( attEv ) ;
Lab ( b , "AttSub" , F ( Str ( ev , 6 ) , days . Count . ToString ( CultureInfo . InvariantCulture ) ) , At ( P , 6 ) , Col ( pc , 2 ) , 'l' , x + 2f , y + At ( P , 6 ) * 0.5f , Col ( pc , 1 ) , 4f ) ;
y + = At ( P , 6 ) + At ( P , 18 ) ;
var last = days . Count > 0 ? days [ days . Count - 1 ] . rewards : new List < EventData . Reward > ( ) ;
EventData . Reward hero = null ;
foreach ( var r in last )
{
var it = EventData . ItemOf ( r . id ) ;
if ( it ! = null & & it . kind = = "hero" ) hero = r ;
}
if ( hero ! = null ) // 영웅 보상만 크게(별 + 「3성 유비」 · PD 4차)
{
var it = EventData . ItemOf ( hero . id ) ;
float ss = At ( P , 11 ) , ht = At ( P , 12 ) ;
Glow ( b , "HeroBlob" , Col ( pc , 8 ) , x - 30f , y - 14f , 410f , ss + ht + 44f ) ;
for ( int k = 0 ; k < it . star ; k + + ) UiKit . Icon ( b , "star_l" , new Vector2 ( 0f , 1f ) , new Vector2 ( 0f , 1f ) , new Vector2 ( x + k * Mathf . Floor ( ss * 0.95f ) , - y ) , ss ) ;
y + = ss + 2f ;
var h = S . Db . Heroes . Get ( it . arg ) ;
Lab ( b , "AttHero" , F ( "ev_hero_star" , it . star . ToString ( CultureInfo . InvariantCulture ) , h ! = null ? h . nameKo : it . arg ) , ht , Col ( pc , 3 ) , 'l' , x , y + ht * 0.5f , Col ( pc , 4 ) , 6f ) ;
}
else
{
float isz = At ( P , 15 ) , gap = At ( P , 16 ) ;
for ( int k = 0 ; k < last . Count ; k + + )
{
float ix = x + k * ( isz + gap ) ;
ItemIcon ( b , "AttRw" + k , last [ k ] . id , ix , y , isz , Color . white ) ;
Lab ( b , "AttRwN" + k , Qty ( last [ k ] . n , false ) , At ( P , 17 ) , Color . white , 'm' , ix + isz * 0.5f , y + isz + 16f , Col ( pc , 1 ) , 3f ) ;
}
}
// 남은 기간 = 왼쪽 아래 알약
Pill ( b , "AttLeft" , Left ( EventRules . AttLeft ( d , attEv , now ) ) , x - 6f , H - At ( P , 8 ) - At ( P , 9 ) , At ( P , 8 ) , At ( P , 10 ) , At ( P , 7 ) , false ) ;
}
/// <summary>날 칸(걸이 목패 · 시안 day_cell) — 받을 칸 = 금빛 + 받기(칸 누름) · 받은 칸 = 어둡게 + 「출석」 도장 · 중간 보상 = 푸른 테 + 글자.</summary>
void DayCell ( EventData . AttendDay day , float x , float y , float w , float h , bool ready , bool claimed )
{
var cc = L ( "cell_col" ) ;
var wood = L ( "wood" ) ;
bool mid = day . mark = = "mid" ;
var cell = UiKit . At ( info , "Day" + day . day , x , y , w , h ) ;
var cg = L ( "cell_glow" ) ;
if ( ready ) Glow ( cell , "Glow" , Col ( cc , 9 ) , At ( cg , 0 ) , At ( cg , 1 ) , w - At ( cg , 0 ) - At ( cg , 2 ) , h - At ( cg , 1 ) - At ( cg , 3 ) ) ;
var pq = Sp ( S_ ( "plaque" ) ) ;
var plaque = Img ( cell , "Plaque" , pq , 0f , 0f , w , h , Col ( wood , mid ? 1 : 0 ) ) ;
if ( ready )
{
plaque . raycastTarget = true ;
plaque . gameObject . AddComponent < Button > ( ) . onClick . AddListener ( ClaimAttend ) ;
}
float top = h * N ( "cell" , 0 ) ;
var rw = day . rewards . Count > 0 ? day . rewards [ 0 ] : new EventData . Reward { id = "" , n = 0 } ;
float isz = Mathf . Floor ( Mathf . Min ( w * 0.5f , h * 0.36f ) ) ;
float iy = h * ( ready ? 0.36f : 0.43f ) ;
var ic = ItemIcon ( cell , "Icon" , rw . id , w * 0.5f - isz * 0.5f , iy , isz , Color . white ) ;
if ( claimed ) Gray ( ic ) ;
if ( claimed )
{
Img ( cell , "Dim" , pq , 0f , 0f , w , h , Col ( cc , 10 ) ) ;
Seal ( cell , w * 0.5f , h * 0.4f + w * 0.31f , w * 0.62f ) ;
}
Lab ( cell , "Amt" + day . day , Qty ( rw . n , false ) , w * 0.12f , Col ( cc , 3 ) , 'm' , w * 0.5f , h * ( ready ? 0.71f : 0.86f ) , Col ( cc , 4 ) , 3f ) ;
if ( mid ) Img ( cell , "MidRing" , Sp ( S_ ( "frame_line" ) ) , 4f , top - 6f , w - 9f , h - top , Col ( cc , 5 ) ) ;
Lab ( cell , "Date" + day . day , F ( "ev_day" , day . day . ToString ( CultureInfo . InvariantCulture ) ) , w * ( mid ? 0.13f : 0.15f ) , Col ( cc , claimed ? 1 : 0 ) , 'm' , w * 0.5f , top + h * ( mid ? 0.06f : 0.075f ) , Col ( cc , 2 ) , claimed ? 3f : 0f ) ;
if ( mid ) Lab ( cell , "Mid" + day . day , T ( "ev_mid" ) , w * 0.125f , Color . white , 'm' , w * 0.5f , top + h * 0.19f , Col ( cc , 6 ) , 3f ) ;
if ( ready ) ClaimChip ( cell , w * 0.5f , h * 0.79f , w * 0.64f , w * 0.19f ) ;
}
/// <summary>받기 칩(초록 · 칸 안 · 시안 day_cell 받기).</summary>
void ClaimChip ( Transform cell , float cx , float top , float bw , float bh )
{
var cc = L ( "cell_col" ) ;
var b = Box ( cell , "Claim" , "soft" , Col ( cc , 7 ) , cx - bw * 0.5f , top , bw , bh ) ; // 얇은 테(QA r1 M · 시안 테 3 px)
UiKit . Border ( b , Col ( cc , 8 ) , 2f ) ;
Lab ( b . transform , "ClaimText" , T ( "ev_claim" ) , bh * 0.6f , Color . white , 'm' , bw * 0.5f , bh * 0.5f + 1f , Col ( cc , 8 ) , 2f ) ;
}
/// <summary>받은 날 도장(붉은 네모 · 크림 테 · 「출석」 · 12° 기울임 · 시안 seal) — 가운데 (cx, cy).</summary>
void Seal ( Transform p , float cx , float cy , float sz )
{
var sc = L ( "seal_col" ) ;
var s = Img ( p , "Seal" , Sp ( S_ ( "seal" ) ) , cx - sz * 0.5f , cy - sz * 0.5f , sz , sz , Color . white ) ;
s . rectTransform . pivot = new Vector2 ( 0.5f , 0.5f ) ;
s . rectTransform . anchoredPosition = new Vector2 ( cx , - cy ) ;
s . rectTransform . localEulerAngles = new Vector3 ( 0f , 0f , - N ( "seal_angle" , 0 ) ) ;
var t = Lab ( s . transform , "SealText" , T ( "ev_stamp" ) , sz * 0.32f , Col ( sc , 0 ) , 'm' , sz * 0.5f , sz * 0.5f + 2f , Col ( sc , 1 ) , Mathf . Max ( 3f , sz / 30f ) ) ;
t . name = "SealText" ;
}
/// <summary>마지막 날 큰 칸(금 판 · 현판 「n일째 특별 보상」 · 영웅 = 둥근 얼굴 + 별 + 이름 · 나머지 작게 · 시안 final_cell).</summary>
void FinalCell ( EventData . AttendDay day , float x , float y , float w , float h , bool ready , bool claimed )
{
var fc = L ( "final_col" ) ;
var cell = UiKit . At ( info , "Day" + day . day , x , y , w , h ) ;
Glow ( cell , "Glow" , Col ( fc , 4 ) , 0f , 0f , w , h ) ;
var pn = Box ( cell , "Panel" , "card" , Color . white , 0f , 0f , w , h ) ;
UiGradient . Add ( pn , Col ( fc , 0 ) , Col ( fc , 1 ) ) ;
if ( ready )
{
pn . raycastTarget = true ;
pn . gameObject . AddComponent < Button > ( ) . onClick . AddListener ( ClaimAttend ) ;
}
Img ( cell , "Inner" , Sp ( S_ ( "frame_line" ) ) , 14f , 14f , w - 29f , h - 29f , Col ( fc , 3 ) ) ;
var sg = Sp ( S_ ( "sign" ) ) ;
float sw = Mathf . Floor ( w * 0.78f ) , shh = sg ! = null ? Mathf . Floor ( sw * sg . rect . height / sg . rect . width ) : sw * 0.25f ;
Img ( cell , "Sign" , sg , w * 0.5f - sw * 0.5f , - Mathf . Floor ( shh / 3f ) , sw , shh , Color . white ) ;
Lab ( cell , "FinalTitle" , F ( "ev_att_sub" , day . day . ToString ( CultureInfo . InvariantCulture ) ) , shh * 0.4f , Color . white , 'm' , w * 0.5f , - Mathf . Floor ( shh / 3f ) + shh * 0.5f , Col ( fc , 5 ) , 3f ) ;
var items = new List < EventData . Reward > ( day . rewards ) ;
EventData . Reward hero = null ;
foreach ( var r in items )
{
var it = EventData . ItemOf ( r . id ) ;
if ( it ! = null & & it . kind = = "hero" ) hero = r ;
}
if ( hero ! = null )
{
var it = EventData . ItemOf ( hero . id ) ;
float hs = Mathf . Floor ( h * 0.46f ) , hx = Mathf . Floor ( w * 0.17f ) , hy = Mathf . Floor ( h * 0.17f ) ;
var ring = UiKit . Dot ( "FaceRing" , cell , new Vector2 ( 0f , 1f ) , new Vector2 ( 0f , 1f ) , new Vector2 ( hx - 6f , - ( hy - 6f ) ) , hs + 12f , Col ( fc , 7 ) ) ;
ring . sprite = UiKit . Circle ;
UiKit . Dot ( "FaceRingIn" , ring . transform , new Vector2 ( 0.5f , 0.5f ) , new Vector2 ( 0.5f , 0.5f ) , Vector2 . zero , hs + 2f , Col ( fc , 6 ) ) . sprite = UiKit . Circle ;
ItemIcon ( cell , "Face" , hero . id , hx , hy , hs , Color . white , true ) ; // 크림 원 위에 얼굴만(QA r1 M 「굵은 어두운 고리」)
float ss = Mathf . Floor ( h * 0.13f ) ;
for ( int k = 0 ; k < it . star ; k + + )
UiKit . Icon ( cell , "star_l" , new Vector2 ( 0f , 1f ) , new Vector2 ( 0f , 1f ) , new Vector2 ( hx + hs * 0.5f - ss * it . star * 0.46f + k * ss * 0.92f , - ( hy + hs + 4f ) ) , ss ) ;
var h0 = S . Db . Heroes . Get ( it . arg ) ;
Lab ( cell , "FinalHero" , F ( "ev_hero_star" , it . star . ToString ( CultureInfo . InvariantCulture ) , h0 ! = null ? h0 . nameKo : it . arg ) , h * 0.13f , Color . white , 'm' , hx + hs * 0.5f , hy + hs + ss + h * 0.085f , Col ( fc , 5 ) , 4f ) ;
items . Remove ( hero ) ;
float rx0 = hx + hs + w * 0.06f , rwid = ( w - 24f - rx0 ) * 0.8f ;
for ( int i = 0 ; i < items . Count ; i + + )
{
float cx = rx0 + rwid * ( i + 0.5f ) / Mathf . Max ( 1 , items . Count ) ;
float isz2 = Mathf . Floor ( Mathf . Min ( h * 0.26f , rwid * 0.5f ) ) ;
ItemIcon ( cell , "FinalRw" + i , items [ i ] . id , cx - isz2 * 0.5f , h * 0.38f , isz2 , Color . white ) ;
Lab ( cell , "FinalRwN" + i , Qty ( items [ i ] . n , false ) , h * 0.075f , Color . white , 'm' , cx , h * 0.38f + isz2 + h * 0.07f , Col ( fc , 5 ) , 3f ) ;
}
}
else
{
int n = Mathf . Max ( 1 , items . Count ) ;
float isz = Mathf . Floor ( Mathf . Min ( h * 0.4f , ( w - 60f ) / n * 0.8f ) ) ;
float gap = ( w - 40f ) / n ;
for ( int i = 0 ; i < items . Count ; i + + )
{
float cx = 20f + gap * ( i + 0.5f ) ;
ItemIcon ( cell , "FinalRw" + i , items [ i ] . id , cx - isz * 0.5f , h * 0.3f , isz , Color . white ) ;
Lab ( cell , "FinalRwN" + i , Qty ( items [ i ] . n , false ) , h * 0.085f , Color . white , 'm' , cx , h * 0.3f + isz + h * 0.09f , Col ( fc , 5 ) , 3f ) ;
}
}
if ( claimed ) Seal ( cell , w * 0.5f , h * 0.25f + h * 0.3f , h * 0.6f ) ;
if ( ready ) ClaimChip ( cell , w * 0.5f , h - h * N ( "final" , 2 ) , w * 0.32f , w * 0.095f ) ;
}
void ClaimAttend ( )
{
2026-11-21 06:13:26 +00:00
Sound . Play ( SoundKeys . UiMission ) ; // 소리: 출석 수령(2026-11-20 사운드)
2026-11-19 13:37:08 +00:00
After ( EventRules . ClaimAttend ( S . Db , S . Save , attEv , S . Now , S . Rng ) , null ) ;
}
}
}