Advertisement
Guest User

UiGuild

a guest
Sep 30th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 248.14 KB | None | 0 0
  1. #include "stdh.h"
  2. #include <Engine/Interface/UIInternalClasses.h>
  3. #include <Engine/Interface/UIGuild.h>
  4. #include <algorithm>
  5. #include <Engine/Contents/Base/UIQuestNew.h>
  6. #include <Engine/Contents/Base/UIQuestBookNew.h>
  7. #include <Engine/Contents/Base/UICharacterInfoNew.h>
  8. #include <Engine/Interface/UIRadar.h>
  9. #include <Engine/Interface/UIGuildNotice.h>
  10. #include <Engine/Interface/UISiegeWarfare.h>
  11. #include <Engine/Object/ActorMgr.h>
  12. #include <Engine/Info/MyInfo.h>
  13. #include <Engine/Interface/UISimplePop.h>
  14. #include <Engine/Contents/Base/Party.h>
  15. #include <Engine/GameDataManager/GameDataManager.h>
  16. #include <Engine/Help/Util_Help.h>
  17. #include <Engine/Math/Float.h>
  18.  
  19. // WSS_NEW_GUILD_SYSTEM 070704
  20. #define MAX_GUILD_LEVEL (50)
  21. #define DEF_GUILD_RECALL_SKILL_IDX 1234
  22. // Date : 2005-03-07, By Lee Ki-hwan
  23. static int _iMaxMsgStringChar = 0;
  24. #define GUILD_NPC 89
  25. #define pWEB m_pWebBoard
  26.  
  27. // WSS_NEW_GUILD_SYSTEM 070705 ---------------------------->><<
  28. // 길드 시스템 추가로 GP및 레벨 상향 조정
  29.  
  30. class CmdGuildMemberListArrange : public Command
  31. {
  32. public:
  33. CmdGuildMemberListArrange() : m_pWnd(NULL), m_eType(eGML_NAME) {}
  34. void setData(CUIGuild* pWnd, eGUILD_MEMBER_LIST eType)
  35. {
  36. m_pWnd = pWnd;
  37. m_eType = eType;
  38. }
  39.  
  40. void execute()
  41. {
  42. if (m_pWnd != NULL)
  43. {
  44. m_pWnd->ArrangeMemList(m_eType);
  45. }
  46. }
  47.  
  48. private:
  49. CUIGuild* m_pWnd;
  50. eGUILD_MEMBER_LIST m_eType;
  51. };
  52. // 길드 제한 조건
  53. struct sGuildConditionTable
  54. {
  55. int iLevel; // 길드 레벨
  56. int iCaptionNeedLevel; // 단장의 최소 조건 레벨
  57. int iNeedSP; // 필요 SP
  58. SQUAD llNeedMoney; // 필요 나스
  59. int iMaxMember; // 길드 인원.
  60. int iNeedGP; // 필요 GP
  61. };
  62.  
  63. // 길드 제한 조건 테이블
  64. sGuildConditionTable _GuildConditionTable[MAX_GUILD_LEVEL] =
  65. {
  66. { 1, 10, 10, 10000, 10 ,0}, // 1 LV
  67. { 2, 15, 30, 50000, 15 ,0}, // 2 LV
  68. { 3, 20, 60, 250000, 20 ,0}, // 3 LV
  69. { 4, 25, 120, 500000, 25 ,0}, // 4 LV
  70. { 5, 30, 240, 1000000, 30 ,0}, // 5 LV
  71. { 6, 30 , 500 , 2000000, 30 ,0}, // 6 LV
  72. { 7, 30 , 550 , 2500000, 30 ,18000}, // 7 LV // 기준 레벨 (Nas/GP/SP계산시)
  73. };
  74.  
  75. enum eSelection
  76. {
  77. SEL_GUILD_CREATE,
  78. SEL_GUILD_UPGRADE,
  79. SEL_GUILD_DESTROY,
  80. SEL_GUILD_ROOM,
  81. SEL_GUILD_TALK,
  82. SEL_GUILD_BUFF, // [2010/06/30 : Sora] 성주 길드 버프부여
  83. // ==> 1107 길드 시스템 개편 [trylord 11/12/28]
  84. SEL_GUILDMASTER_KICK_REQUEST, // 길드장 해임 심사 신청
  85. SEL_GUILDMASTER_KICK_CANCEL_REQUEST, // 길드장 해임 이의제기 신청 (자신이 길드장일 때)
  86. // <== 1107 길드 시스템 개편 [trylord 11/12/28]
  87. };
  88.  
  89. enum eCorpsComboSelection
  90. {
  91. CMB_NOMEMBER = 0, // 부대없음
  92. CMB_RUSH_CAPTAIN = 1, // 돌격대장
  93. CMB_SUPPORT_CAPTAIN = 2, // 지원대장
  94. CMB_RECON_CAPTAIN = 3, // 정찰대장
  95. CMB_RUSH_MEMBER = 4, // 돌격대원
  96. CMB_SUPPORT_MEMBER = 5, // 지원대원
  97. CMB_RECON_MEMBER = 6, // 정찰대원
  98. };
  99. // FIXME : 아래 이름이 개판.
  100. #define GUILD_TAB_WIDTH (100)
  101. #define START_BUTTON_Y (GUILD_HEIGHT - 123) // 284 - 123 = 161
  102. #define DESC_LIST_BOX_HEIGHT (190)
  103. #define MEMBER_LIST_BOX_WIDTH (190)
  104. #define MEMBER_LIST_BOX_HEIGHT (88)
  105. #define EDIT_BOX_Y (GUILD_HEIGHT - 57) // 284 - 57 = 227
  106. #define START_BOTTOM_BUTTON_Y (GUILD_HEIGHT - 29) // 284 - 29 = 255
  107. #define SPAN_TEXT_Y (17)
  108.  
  109. #define GUILD_DESC_CHAR_WIDTH 168
  110.  
  111. //WSS_NEW_GUILD_SYSTEM 070716
  112. #define MAX_NOTICE_TITLE (64)
  113. #define MAX_NOTICE_CONTENTS (512)
  114. #define MAX_POSITION_NAME (12)
  115. #define MAX_PERCENT_LENGTH (3)
  116. #define NEW_GUILD_SYSTEM_WIDTH (602)
  117. #define NEW_GUILD_SYSTEM_HEIGHT (346)
  118. #define GUILD_SKILL_SLOT_ROW (5)
  119. #define GUILD_SKILL_SLOT_OFFSETY (40)
  120.  
  121. #define GUILD_ACTIVE_SKILL_START -1
  122. #define GUILD_PASSIVE_SKILL_START -2
  123. #define GUILD_ETC_SKILL_START -3
  124.  
  125. #define GUILD_SKILL_ACTIVE 0
  126. #define GUILD_SKILL_PASSIVE 1
  127. #define GUILD_SKILL_ETC 2
  128.  
  129. const static int nMaxCorpsMember = 29;
  130. const static int nMaxCorpsBoss = 3;
  131. /*
  132. #ifdef LIMIT_GUILD_LEVEL
  133. #undef LIMIT_GUILD_LEVEL
  134. #define LIMIT_GUILD_LEVEL 0
  135. #endif*/
  136. // ----------------------------------------------------------------------------
  137. // Name : CUIGuild()
  138. // Desc :
  139. // ----------------------------------------------------------------------------
  140. CUIGuild::CUIGuild()
  141. : m_pIconGuildMark(NULL)
  142. {
  143. m_eGuildState = GUILD_REQ;
  144. m_nCurrentTab = GUILD_TAB_MEMBER;
  145. m_strBossName = "";
  146. m_strViceBoss[0] = "";
  147. m_strViceBoss[1] = "";
  148. m_strGuildName = "";
  149. m_iGuildLevel = -1;
  150. m_iGuildIndex = -1;
  151. m_iNumOfMember = 0;
  152. m_iUserRanking = GUILD_MEMBER_MEMBER;
  153. m_bChackNpc = FALSE;
  154. // WSS_NEW_GUILD_SYSTEM 070716 -------------------------------------->>
  155. m_iSelTab = 0; // 디폴트 텝
  156. m_iGuildAverageLevel = 0; // 길드 평균 레벨
  157. m_iGuildOwnLand = 0; // 길드 소유 영지
  158. m_iGuildTotalPoint = 0; // 길드 총 포인트
  159. m_iGuildMyPoint = 0; // 나의 기여 포인트
  160. m_bApplySettingOn = FALSE;
  161. m_iNumOfMaxMember = 0;
  162. m_iGuildSkillPos = 0;
  163. m_bIsSelList = FALSE;
  164. m_pWebBoard = NULL;
  165. m_bEnableCorrect = FALSE;
  166. // ------------------------------------------------------------------<<
  167. m_nSelSkillTab = GUILD_SKILL_PASSIVE; // 길드 스킬 탭
  168. // ------------------------------------------------------------------<<
  169. // [1/3/2011 kiny8216] NEW_CORPS
  170. m_iCorpsMember = 0;
  171. m_iCorpsBoss = 0;
  172.  
  173. m_guildMarkTime = -1; // [sora] GUILD_MARK
  174.  
  175. int i;
  176. for (i = 0; i < GUILD_SKILL_VIEW_MAX; ++i)
  177. {
  178. m_pIconsGuildSkillEx[i] = NULL;
  179. }
  180.  
  181. for (i = 0; i < eGML_MAX; ++i)
  182. m_pCbMemberArrange[i] = NULL;
  183. }
  184.  
  185. // ----------------------------------------------------------------------------
  186. // Name : ~CUIGuild()
  187. // Desc : Destructor
  188. // ----------------------------------------------------------------------------
  189. CUIGuild::~CUIGuild()
  190. {
  191. Destroy();
  192.  
  193. if(!m_vectorMemberList.empty())
  194. {
  195. m_vectorMemberList.clear();
  196. }
  197. ClearGuildSkill();
  198.  
  199. STOCK_RELEASE(m_ptdSelBoxTexture);
  200.  
  201. int i;
  202.  
  203. for (i = 0; i < GUILD_SKILL_VIEW_MAX; ++i)
  204. {
  205. SAFE_DELETE(m_pIconsGuildSkillEx[i]);
  206. }
  207.  
  208. SAFE_DELETE(m_pIconGuildMark);
  209.  
  210. for (i = 0; i < eGML_MAX; ++i)
  211. SAFE_DELETE(m_pCbMemberArrange[i]);
  212.  
  213. m_ContGuild.clear();
  214. }
  215.  
  216. // ----------------------------------------------------------------------------
  217. // Name : Create()
  218. // Desc :
  219. // ----------------------------------------------------------------------------
  220. void CUIGuild::Create( CUIWindow *pParentWnd, int nX, int nY, int nWidth, int nHeight )
  221. {
  222. int i;
  223.  
  224. CUIWindow::Create(pParentWnd, nX, nY, nWidth, nHeight);
  225.  
  226. InitString();
  227.  
  228. _iMaxMsgStringChar = GUILD_DESC_CHAR_WIDTH / ( _pUIFontTexMgr->GetFontWidth() + _pUIFontTexMgr->GetFontSpacing() );
  229.  
  230. // Region of each part
  231. m_rcTitle.SetRect( 0, 0, 216, 22 );
  232. m_rcTab.SetRect( 6, 26, 210, 42 );
  233.  
  234. // Create skill learn texture
  235. m_ptdBaseTexture = CreateTexture( CTString( "Data\\Interface\\MessageBox.tex" ) );
  236. FLOAT fTexWidth = m_ptdBaseTexture->GetPixWidth();
  237. FLOAT fTexHeight = m_ptdBaseTexture->GetPixHeight();
  238.  
  239. // UV Coordinate of each part
  240. // Background
  241. m_rtBackTop.SetUV( 0, 0, 216, 26, fTexWidth, fTexHeight );
  242. m_rtBackMiddle1.SetUV( 0, 31, 216, 33, fTexWidth, fTexHeight );
  243. m_rtBackMiddle2.SetUV( 0, 35, 216, 37, fTexWidth, fTexHeight );
  244. m_rtBackManagerTop.SetUV( 36, 69, 252, 106, fTexWidth, fTexHeight ); // 37
  245. m_rtBackManagerMiddle.SetUV( 36, 106, 252, 112, fTexWidth, fTexHeight ); // 6
  246. m_rtBackManagerBottom.SetUV( 36, 112, 252, 116, fTexWidth, fTexHeight ); // 4
  247. m_rtBackBottom.SetUV( 0, 38, 216, 45, fTexWidth, fTexHeight );
  248.  
  249. // Input box
  250. m_rtInputBoxL.SetUV( 131, 46, 135, 59, fTexWidth, fTexHeight );
  251. m_rtInputBoxM.SetUV( 137, 46, 139, 59, fTexWidth, fTexHeight );
  252. m_rtInputBoxR.SetUV( 141, 46, 145, 59, fTexWidth, fTexHeight );
  253.  
  254. m_rtTab.SetUV( 43, 69, 44, 86, fTexWidth, fTexHeight );
  255.  
  256. // Close button
  257. m_btnClose.Create( this, CTString( "" ), 184, 4, 14, 14 );
  258. m_btnClose.SetUV( UBS_IDLE, 219, 0, 233, 14, fTexWidth, fTexHeight );
  259. m_btnClose.SetUV( UBS_CLICK, 234, 0, 248, 14, fTexWidth, fTexHeight );
  260. m_btnClose.CopyUV( UBS_IDLE, UBS_ON );
  261. m_btnClose.CopyUV( UBS_IDLE, UBS_DISABLE );
  262.  
  263. // Learn button
  264. m_btnOK.Create( this, _S( 191, "확인" ), 78, START_BOTTOM_BUTTON_Y, 63, 21 );
  265. m_btnOK.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  266. m_btnOK.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  267. m_btnOK.CopyUV( UBS_IDLE, UBS_ON );
  268. m_btnOK.CopyUV( UBS_IDLE, UBS_DISABLE );
  269.  
  270. // Cancel button
  271. m_btnCancel.Create( this, _S( 139, "취소" ), 145, START_BOTTOM_BUTTON_Y, 63, 21 );
  272. m_btnCancel.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  273. m_btnCancel.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  274. m_btnCancel.CopyUV( UBS_IDLE, UBS_ON );
  275. m_btnCancel.CopyUV( UBS_IDLE, UBS_DISABLE );
  276.  
  277. // Exit button
  278. m_btnExit.Create( this, _S( 870, "닫기" ), 145, START_BOTTOM_BUTTON_Y, 63, 21 );
  279. m_btnExit.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  280. m_btnExit.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  281. m_btnExit.CopyUV( UBS_IDLE, UBS_ON );
  282. m_btnExit.CopyUV( UBS_IDLE, UBS_DISABLE );
  283.  
  284. int nButtonY = START_BUTTON_Y;
  285.  
  286. // Change Boss button
  287. m_btnChangeBoss.Create( this, _S( 871, "길드장 이임" ), 92, START_BUTTON_Y, 115, 21 );
  288. m_btnChangeBoss.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  289. m_btnChangeBoss.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  290. m_btnChangeBoss.CopyUV( UBS_IDLE, UBS_ON );
  291. m_btnChangeBoss.CopyUV( UBS_IDLE, UBS_DISABLE );
  292.  
  293. nButtonY += 23;
  294. // Accept button
  295. m_btnAccept.Create( this, _S( 872, "길드부장 임명" ), 92, nButtonY, 115, 21 );
  296. m_btnAccept.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  297. m_btnAccept.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  298. m_btnAccept.CopyUV( UBS_IDLE, UBS_ON );
  299. m_btnAccept.CopyUV( UBS_IDLE, UBS_DISABLE );
  300.  
  301. nButtonY += 23;
  302. // Reject button
  303. m_btnReject.Create( this, _S( 873, "길드부장 해임" ), 92, nButtonY, 115, 21 );
  304. m_btnReject.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  305. m_btnReject.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  306. m_btnReject.CopyUV( UBS_IDLE, UBS_ON );
  307. m_btnReject.CopyUV( UBS_IDLE, UBS_DISABLE );
  308.  
  309. nButtonY += 23;
  310. // MemberQuit button
  311. m_btnMemberFire.Create( this, _S( 874, "길드원 퇴출" ), 92, nButtonY, 115, 21 );
  312. m_btnMemberFire.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  313. m_btnMemberFire.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  314. m_btnMemberFire.CopyUV( UBS_IDLE, UBS_ON );
  315. m_btnMemberFire.CopyUV( UBS_IDLE, UBS_DISABLE );
  316.  
  317. // Guild Name edit box
  318. m_ebGuildName.Create( this, 100, EDIT_BOX_Y - 2, 90, 16, 16 );
  319. m_ebGuildName.SetReadingWindowUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  320. m_ebGuildName.SetCandidateUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  321.  
  322. // [2011/11/02 : Sora] 커서 이동 불가플래그
  323. m_ebGuildName.SetCursorMove( FALSE );
  324.  
  325. // List box of guild description
  326. m_lbGuildDesc.Create( this, 8, 28, 190, 190, _pUIFontTexMgr->GetLineHeight(), 13, 3, 1, FALSE );
  327. m_lbGuildDesc.CreateScroll( TRUE, 0, 0, 9, DESC_LIST_BOX_HEIGHT, 9, 7, 0, 0, 10 );
  328. m_lbGuildDesc.SetSelBar( 190, _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  329. // Up button
  330. m_lbGuildDesc.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  331. m_lbGuildDesc.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  332. m_lbGuildDesc.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  333. m_lbGuildDesc.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  334. // Down button
  335. m_lbGuildDesc.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  336. m_lbGuildDesc.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  337. m_lbGuildDesc.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  338. m_lbGuildDesc.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  339. // Bar button
  340. m_lbGuildDesc.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  341. m_lbGuildDesc.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  342. m_lbGuildDesc.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  343.  
  344. // List box of guild description
  345. m_lbMemberList.Create( this, 8, 63, MEMBER_LIST_BOX_WIDTH, MEMBER_LIST_BOX_HEIGHT, _pUIFontTexMgr->GetLineHeight(), 13, 3, 2, TRUE );
  346. m_lbMemberList.CreateScroll( TRUE, 0, 0, 9, MEMBER_LIST_BOX_HEIGHT, 9, 7, 0, 0, 10 );
  347. m_lbMemberList.SetSelBar( MEMBER_LIST_BOX_WIDTH, _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  348. m_lbMemberList.SetOverColor( 0xF8E1B5FF );
  349. m_lbMemberList.SetSelectColor( 0xF8E1B5FF );
  350. m_lbMemberList.SetColumnPosX( 1, 110 );
  351. // Up button
  352. m_lbMemberList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  353. m_lbMemberList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  354. m_lbMemberList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  355. m_lbMemberList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  356. // Down button
  357. m_lbMemberList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  358. m_lbMemberList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  359. m_lbMemberList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  360. m_lbMemberList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  361. // Bar button
  362. m_lbMemberList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  363. m_lbMemberList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  364. m_lbMemberList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  365.  
  366. // List box of guild description
  367. m_lbApplicantList.Create( this, 8, 63, MEMBER_LIST_BOX_WIDTH, MEMBER_LIST_BOX_HEIGHT * 2, _pUIFontTexMgr->GetLineHeight()+5, 13, 3, 2, FALSE );
  368. m_lbApplicantList.CreateScroll( TRUE, 0, 0, 9, MEMBER_LIST_BOX_HEIGHT * 2, 9, 7, 0, 0, 10 );
  369. m_lbApplicantList.SetSelBar( MEMBER_LIST_BOX_WIDTH, _pUIFontTexMgr->GetLineHeight()+5, 187, 46, 204, 61, fTexWidth, fTexHeight );
  370. m_lbApplicantList.SetOverColor( 0xF8E1B5FF );
  371. m_lbApplicantList.SetSelectColor( 0xF8E1B5FF );
  372. m_lbApplicantList.SetColumnPosX( 1, 115 );
  373. // Up button
  374. m_lbApplicantList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  375. m_lbApplicantList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  376. m_lbApplicantList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  377. m_lbApplicantList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  378. // Down button
  379. m_lbApplicantList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  380. m_lbApplicantList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  381. m_lbApplicantList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  382. m_lbApplicantList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  383. // Bar button
  384. m_lbApplicantList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  385. m_lbApplicantList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  386. m_lbApplicantList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  387.  
  388. CSetFPUPrecision _set_Precision(FPT_64BIT);
  389.  
  390. // WSS_NEW_GUILD_SYSTEM 070704
  391. for(i= 7;i<MAX_GUILD_LEVEL;i++)
  392. {
  393. if(i+1>=5 && i+1<=10)
  394. _GuildConditionTable[i].iCaptionNeedLevel = 30;
  395. else if(i+1>=11 && i+1<=19)
  396. _GuildConditionTable[i].iCaptionNeedLevel = 40;
  397. else if(i+1>=20)
  398. _GuildConditionTable[i].iCaptionNeedLevel = 30 + 10*((i+1)/10);
  399.  
  400. _GuildConditionTable[i].iLevel = i+1;
  401. // 필요나스/sp/gp = 7레벨업시 필요량 * (1.09^(길드LV - 7))
  402. _GuildConditionTable[i].iMaxMember = _GuildConditionTable[6].iMaxMember;
  403. _GuildConditionTable[i].iNeedGP = _GuildConditionTable[6].iNeedGP * pow(1.09,i-6);
  404. _GuildConditionTable[i].iNeedSP = _GuildConditionTable[6].iNeedSP * pow(1.09,i-6);
  405. _GuildConditionTable[i].llNeedMoney = _GuildConditionTable[6].llNeedMoney * pow(1.09,i-6);
  406. }
  407. CreateNew(pParentWnd,nX,nY);
  408.  
  409. // List Box of Guild Skill Use Info : 길드 스킬 사용 정보
  410. m_lbUseInfo.Create( this, 270, 178, 140, 70, _pUIFontTexMgr->GetLineHeight(), 13, 3, 1, FALSE );
  411. m_lbUseInfo.CreateScroll( TRUE, 0, 0, 9, 70, 9, 7, 0, 0, 10 );
  412. // Up button
  413. m_lbUseInfo.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  414. m_lbUseInfo.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  415. m_lbUseInfo.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  416. m_lbUseInfo.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  417. // Down button
  418. m_lbUseInfo.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  419. m_lbUseInfo.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  420. m_lbUseInfo.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  421. m_lbUseInfo.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  422. // Bar button
  423. m_lbUseInfo.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  424. m_lbUseInfo.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  425. m_lbUseInfo.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  426.  
  427. // List Box of Guild Skill Learn Info : 스킬 습득 정보
  428. m_lbLearnInfo.Create( this, 427, 178, 140, 70, _pUIFontTexMgr->GetLineHeight(), 13, 3, 1, FALSE );
  429. m_lbLearnInfo.CreateScroll( TRUE, 0, 0, 9, 70, 9, 7, 0, 0, 10 );
  430. // Up button
  431. m_lbLearnInfo.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  432. m_lbLearnInfo.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  433. m_lbLearnInfo.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  434. m_lbLearnInfo.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  435. // Down button
  436. m_lbLearnInfo.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  437. m_lbLearnInfo.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  438. m_lbLearnInfo.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  439. m_lbLearnInfo.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  440. // Bar button
  441. m_lbLearnInfo.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  442. m_lbLearnInfo.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  443. m_lbLearnInfo.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  444.  
  445. // Use Skill
  446. m_btnUseSkill.Create( this, _S(5013, "사용하기" ), 295, 256, 100, 21 );
  447. m_btnUseSkill.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  448. m_btnUseSkill.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  449. m_btnUseSkill.CopyUV( UBS_IDLE, UBS_ON );
  450. m_btnUseSkill.CopyUV( UBS_IDLE, UBS_DISABLE );
  451.  
  452. // Tab Rect : Active / Passive
  453. m_rcSkillTab[GUILD_SKILL_PASSIVE].SetRect(15, 79, 37, 167);
  454. m_rcSkillTab[GUILD_SKILL_ACTIVE].SetRect(15, 169, 37, 257);
  455.  
  456. m_rcSkillTabPopupInfo.SetRect( 0, 0, 100, 30 );
  457. // 길드 스킬 버튼 rect
  458. int nPosY1 = 70, nPosY2 = 103;
  459. for (int iCnt=0; iCnt<5; ++iCnt)
  460. {
  461. m_rcSkillBtn[iCnt].SetRect(46, nPosY1, 240, nPosY2);
  462. nPosY1 += 40;
  463. nPosY2 += 40;
  464. }
  465. // ITS#6919 : [FIXED] UI cracked in guild setting window [2/20/2012 rumist]
  466. // Combo Box Setting
  467. m_cmbCorps.Create( this, 218, 98, 143, 22, 123, 6, 13, 7, 7, _pUIFontTexMgr->GetFontHeight() + 4, 8, 4 );
  468. m_cmbCorps.SetBackUV( 54, 162, 72, 177, fTexWidth, fTexHeight );
  469. m_cmbCorps.SetDownBtnUV( 230, 162, 242, 172, fTexWidth, fTexHeight );
  470. m_cmbCorps.SetUpBtnUV( 242, 172, 230, 162, fTexWidth, fTexHeight );
  471. m_cmbCorps.SetDropListUV( 54, 162, 70, 176, fTexWidth, fTexHeight );
  472.  
  473. m_ptdSelBoxTexture = CreateTexture( CTString( "Data\\Interface\\CommonBtn.tex" ));
  474. fTexWidth = m_ptdSelBoxTexture->GetPixWidth();
  475. fTexHeight = m_ptdSelBoxTexture->GetPixHeight();
  476. // 스킬 선택 시, 텍스쳐
  477. m_rtSelBoxUV.SetUV( 145, 138, 240, 172, fTexWidth, fTexHeight );
  478.  
  479. // 길드 스킬 좌측 세로 탭
  480. m_rtSelSideTabUV.SetUV(59, 0, 80, 101, fTexWidth, fTexHeight);
  481. m_rtUnSelSideTabUV.SetUV(86, 0, 107, 101, fTexWidth, fTexHeight);
  482.  
  483. // 길드 스킬 탭 팝업 정보
  484. m_rtPopupUL.SetUV( 0, 229, 8, 237, fTexWidth, fTexHeight );
  485. m_rtPopupUM.SetUV( 8, 229, 76, 237, fTexWidth, fTexHeight );
  486. m_rtPopupUR.SetUV( 76, 229, 84, 237, fTexWidth, fTexHeight );
  487. m_rtPopupML.SetUV( 0, 237, 8, 243, fTexWidth, fTexHeight );
  488. m_rtPopupMM.SetUV( 8, 237, 76, 243, fTexWidth, fTexHeight );
  489. m_rtPopupMR.SetUV( 76, 237, 84, 243, fTexWidth, fTexHeight );
  490. m_rtPopupLL.SetUV( 0, 243, 8, 251, fTexWidth, fTexHeight );
  491. m_rtPopupLM.SetUV( 8, 243, 76, 251, fTexWidth, fTexHeight );
  492. m_rtPopupLR.SetUV( 76, 243, 84, 251, fTexWidth, fTexHeight );
  493.  
  494. // 길드 스킬 탭 위에 그려지는 텍스쳐
  495. m_rtPassiveTabIconUV[0].SetUV(183, 222, 196, 236, fTexWidth, fTexHeight );
  496. m_rtPassiveTabIconUV[1].SetUV(200, 222, 213, 236, fTexWidth, fTexHeight );
  497. m_rtActiveTabIconUV[0].SetUV(183, 205, 196, 219, fTexWidth, fTexHeight );
  498. m_rtActiveTabIconUV[1].SetUV(200, 205, 213, 219, fTexWidth, fTexHeight );
  499.  
  500. // [1/11/2011 kiny8216] Guild_Skill_Fix
  501. int nBtnY = 71;
  502.  
  503. for ( int nCnt=0; nCnt < GUILD_SKILL_VIEW_MAX; ++nCnt )
  504. {
  505. m_pIconsGuildSkillEx[nCnt] = new CUIIcon();
  506. m_pIconsGuildSkillEx[nCnt]->Create(this, 48, nBtnY, 32, 31, UI_GUILD, UBET_SKILL);
  507. m_pIconsGuildSkillEx[nCnt]->SetWhichUI(UI_GUILD);
  508.  
  509. nBtnY += 40;
  510. }
  511.  
  512. // 군단 관련 스트링 초기화
  513.  
  514. // Guild Member List Box Setting
  515. m_lbGuildMemberList.SetPopBtnSpace(1, 1);
  516. m_lbGuildMemberList.SetPopBtnSize(19, m_lbGuildMemberList.GetLineHeight()-2);
  517.  
  518. // Manage Button, Edit Box Position
  519. m_ebChangePositionName.SetPos( 220, 145 );
  520. m_ebChangePayExp.SetPos( 220, 187 );
  521. m_ebChangePayFame.SetPos( 220, 229 );
  522. m_ckGuildStashPermission.SetPos( 230, 271 );
  523.  
  524. #ifdef ENABLE_GUILD_STASH
  525. m_btnApplySetting.SetPos( 220, 308 );
  526. m_btnApplySettingClose.SetPos( 295, 308 );
  527. #else
  528. m_btnApplySetting.SetPos( 220, 263 );
  529. m_btnApplySettingClose.SetPos( 295, 263 );
  530. #endif
  531.  
  532. int nBtnHeight = 17, nGap = 1;
  533. int nBtnWidth[eGML_MAX] = {98, 74, 39, 81, 85, 46, 105};
  534. int nStrIdx[eGML_MAX] = {3105, 3856, 3851, 72, 3857, 3858, 3859};
  535. int nPosX, nPosY = 60;
  536. //3105, "캐릭터명"
  537. //3856, "직위명"
  538. //3851, "Lv."
  539. //72, "클래스"
  540. //3857, "접속위치"
  541. //3858, "기여도"
  542. //3859, "누적 포인트
  543.  
  544. for (i = 0; i < eGML_MAX; ++i)
  545. {
  546. UIRectUV uvNone, uvCheck;
  547. uvNone.SetUV(466, 40, 478, 52);
  548. uvCheck.SetUV(466, 54, 478, 66);
  549.  
  550. m_pCbMemberArrange[i] = new CUICheckButton;
  551. m_pCbMemberArrange[i]->setParent(this);
  552. m_pCbMemberArrange[i]->SetSize(12, 12);
  553. m_pCbMemberArrange[i]->SetText(_S(nStrIdx[i], ""));
  554.  
  555. if (i <= 0)
  556. nPosX = 48 + nBtnWidth[i] - 12;
  557. else
  558. nPosX = m_pCbMemberArrange[i - 1]->GetPosX() + nBtnWidth[i] + nGap;
  559.  
  560. m_pCbMemberArrange[i]->setTextArea(nBtnWidth[i]);
  561. m_pCbMemberArrange[i]->SetPos(nPosX, nPosY);
  562. m_pCbMemberArrange[i]->setTexString("CommonBtn.tex");
  563. m_pCbMemberArrange[i]->SetUVTex(UCBS_NONE, uvNone);
  564. m_pCbMemberArrange[i]->SetUVTex(UCBS_CHECK, uvCheck);
  565. m_pCbMemberArrange[i]->SetCheckRegion(TRUE, nBtnWidth[i] - 12, nBtnWidth[i]);
  566. m_pCbMemberArrange[i]->SetTextColor(UCBS_NONE, 0xF2F2F2FF);
  567. m_pCbMemberArrange[i]->SetTextColor(UCBS_CHECK, 0xF2F2F2FF);
  568.  
  569. CmdGuildMemberListArrange* pCmd = new CmdGuildMemberListArrange;
  570. pCmd->setData(this, eGUILD_MEMBER_LIST(i));
  571. m_pCbMemberArrange[i]->SetCommand(pCmd);
  572. }
  573. }
  574.  
  575. // ----------------------------------------------------------------------------
  576. // Name : ResetPosition()
  577. // Desc :
  578. // ----------------------------------------------------------------------------
  579. void CUIGuild::ResetPosition( PIX pixMinI, PIX pixMinJ, PIX pixMaxI, PIX pixMaxJ )
  580. {
  581. SetPos( ( pixMaxI + pixMinI - GetWidth() ) / 2, ( pixMaxJ + pixMinJ - GetHeight() ) / 2 );
  582. }
  583.  
  584. // ----------------------------------------------------------------------------
  585. // Name : AdjustPosition()
  586. // Desc :
  587. // ----------------------------------------------------------------------------
  588. void CUIGuild::AdjustPosition( PIX pixMinI, PIX pixMinJ, PIX pixMaxI, PIX pixMaxJ )
  589. {
  590. if( m_nPosX < pixMinI || m_nPosX + GetWidth() > pixMaxI ||
  591. m_nPosY < pixMinJ || m_nPosY + GetHeight() > pixMaxJ )
  592. ResetPosition( pixMinI, pixMinJ, pixMaxI, pixMaxJ );
  593. }
  594.  
  595. // WSS_NEW_GUILD_SYSTEM 070702
  596. // 불필요해서 주석처리
  597. //------------------------------------------------------------------------------
  598. // CUIGuild::SetFocus
  599. // Explain:
  600. // Date : 2005-03-10(오후 1:02:39) Lee Ki-hwan
  601. //------------------------------------------------------------------------------
  602. //void CUIGuild::SetFocus( BOOL bVisible )
  603. //{
  604. // CUIWindow::SetFocus( bVisible );
  605. //
  606. // m_ebGuildName.SetFocus( TRUE );
  607. // if( !bVisible )
  608. // {
  609. // m_ebGuildName.SetFocus( FALSE );
  610. // }
  611. //}
  612.  
  613.  
  614. // ----------------------------------------------------------------------------
  615. // Name : OpenGuild()
  616. // Desc :
  617. // ----------------------------------------------------------------------------
  618. void CUIGuild::OpenGuild( int iMobIndex, BOOL bHasQuest, int iUserRanking, int iGuildLevel )
  619. {
  620. CUIManager* pUIManager = CUIManager::getSingleton();
  621.  
  622. if(pUIManager->DoesMessageBoxLExist( MSGLCMD_GUILD_REQ ) || IsVisible())
  623. return;
  624.  
  625. ResetGuild();
  626.  
  627. m_iUserRanking = iUserRanking;
  628. m_iGuildLevel = iGuildLevel;
  629.  
  630. pUIManager->CloseMessageBox(MSGCMD_GUILD_ERROR);
  631. pUIManager->CloseMessageBox(MSGCMD_GUILD_DESTROY);
  632. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN);
  633. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN_REQ);
  634. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT);
  635. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT_CONFIRM);
  636. pUIManager->CloseMessageBox(MSGCMD_GUILD_APPLICANT_JOIN);
  637. pUIManager->CloseMessageBox(MSGCMD_GUILD_ROOM);
  638.  
  639. // Create guild message box
  640.  
  641. // Reset Window Size // WSS_NEW_GUILD_SYSTEM 070725
  642. SetSize( GUILD_WIDTH, GUILD_HEIGHT );
  643.  
  644. pUIManager->CreateMessageBoxL( _S( 865, "길드" ) , UI_GUILD, MSGLCMD_GUILD_REQ );
  645.  
  646. CTString strNpcName = CMobData::getData(iMobIndex)->GetName();
  647. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, TRUE, strNpcName, -1, 0xE18600FF );
  648.  
  649. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, TRUE, _S( 875, "사악한 무리를 감시하느라 한시도 시간을 낼 수 없네." ), -1, 0xA3A1A3FF );
  650. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, TRUE, _S( 876, "용건이 없다면 그냥 돌아 가시게." ), -1, 0xA3A1A3FF );
  651.  
  652. if( m_iUserRanking == GUILD_MEMBER_MEMBER || m_iUserRanking == GUILD_MEMBER_VICE_BOSS || m_iUserRanking == GUILD_MEMBER_NOMEMBER )
  653. {
  654. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 877, "길드 결성." ), SEL_GUILD_CREATE );
  655. }
  656. // [2010/06/30 : Sora] 성주 길드 버프부여
  657. #if defined(G_KOR)
  658. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 5014, "성의축복 받기" ), SEL_GUILD_BUFF );
  659. #endif
  660. if( m_iUserRanking == GUILD_MEMBER_BOSS )
  661. {
  662. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 878, "길드 승급." ), SEL_GUILD_UPGRADE );
  663. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 879, "길드 해산." ), SEL_GUILD_DESTROY );
  664. }
  665.  
  666. if( m_iUserRanking != GUILD_MEMBER_NOMEMBER )
  667. {
  668. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 1011, "길드 대화방으로 이동." ), SEL_GUILD_ROOM );
  669. }
  670.  
  671. #ifdef UPDATE1107_GUILDSYSTEM
  672. // 1107 길드 시스템 개편 [trylord 11/12/28]
  673. if(_pNetwork->MyCharacterInfo.lGuildIndex != -1)
  674. { // 길드에 소속되어있을 때에만 메뉴를 보여준다
  675. if(_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_VICE_BOSS)
  676. { // 부단장일 경우 길드장 해임 심사를 신청할 수 있다.
  677. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 5613, "길드장 해임 심사 신청" ), SEL_GUILDMASTER_KICK_REQUEST );
  678. }
  679. else if(_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS
  680. && _pNetwork->MyCharacterInfo.iGuildMasterKickStatus == 1)
  681. { // 자신이 단장이고, 현재 자신은 해임 심사를 당한 상태 -- 이의를 신청할 수 있다.
  682. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 5614, "길드장 해임 이의제기" ), SEL_GUILDMASTER_KICK_CANCEL_REQUEST );
  683. }
  684. }
  685. #endif // #ifdef UPDATE1107_GUILDSYSTEM
  686.  
  687. if( bHasQuest )
  688. {
  689. // 2009. 05. 27 김정래
  690. // 이야기한다 변경 처리
  691. CUIQuestBook::AddQuestListToMessageBoxL(MSGLCMD_GUILD_REQ);
  692. }
  693.  
  694. pUIManager->AddMessageBoxLString( MSGLCMD_GUILD_REQ, FALSE, _S( 1220, "취소하기." ) );
  695. }
  696.  
  697. // ----------------------------------------------------------------------------
  698. // Name : OpenGuildManager()
  699. // Desc :
  700. // ----------------------------------------------------------------------------
  701. void CUIGuild::OpenGuildManager( int iUserRanking )
  702. {
  703. if( iUserRanking < 0 || iUserRanking == GUILD_MEMBER_NOMEMBER )
  704. {
  705. return;
  706. }
  707.  
  708. if( IsVisible() )
  709. {
  710. ResetGuild();
  711. return;
  712. }
  713.  
  714. // Reset Window Size // WSS_NEW_GUILD_SYSTEM 070725
  715. SetSize( GUILD_WIDTH, GUILD_HEIGHT );
  716.  
  717. // FIXME : 길드 메니저에서는 호출하면 안됨.
  718. // FIXME : 애들 목록을 받은 것을 다 갖고 있어야 하는데, ResetGuild()를 호출하면 다 날라감.
  719. //ResetGuild();
  720.  
  721. m_iUserRanking = iUserRanking;
  722. m_eGuildState = GUILD_MANAGER;
  723.  
  724. m_btnChangeBoss.SetEnable( (m_iUserRanking == GUILD_MEMBER_BOSS) ? TRUE : FALSE );
  725. m_btnAccept.SetEnable( (m_iUserRanking == GUILD_MEMBER_BOSS) ? TRUE : FALSE );
  726. m_btnReject.SetEnable( (m_iUserRanking == GUILD_MEMBER_BOSS) ? TRUE : FALSE );
  727. m_btnMemberFire.SetEnable( (m_iUserRanking < GUILD_MEMBER_MEMBER) ? TRUE : FALSE );
  728.  
  729. if( m_iUserRanking == GUILD_MEMBER_BOSS || m_iUserRanking == GUILD_MEMBER_VICE_BOSS )
  730. {
  731. RefreshMemberList( TRUE );
  732. }
  733. else
  734. {
  735. RefreshApplicantList( TRUE );
  736. }
  737.  
  738. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, TRUE );
  739.  
  740. }
  741.  
  742. // ----------------------------------------------------------------------------
  743. // Name : ResetGuild()
  744. // Desc :
  745. // ----------------------------------------------------------------------------
  746. void CUIGuild::ResetGuild()
  747. {
  748. m_ebGuildName.ResetString();
  749. m_lbGuildDesc.ResetAllStrings();
  750. m_lbMemberList.ResetAllStrings();
  751. m_lbApplicantList.ResetAllStrings();
  752.  
  753. //m_strBossName = "";
  754. m_strViceBoss[0] = "";
  755. m_strViceBoss[1] = "";
  756. m_strGuildName = "";
  757.  
  758. m_iGuildLevel = -1;
  759. m_iGuildIndex = -1;
  760. m_iNumOfMember = 0;
  761.  
  762. m_eGuildState = GUILD_REQ;
  763. m_nCurrentTab = GUILD_TAB_MEMBER;
  764. m_iUserRanking = GUILD_MEMBER_MEMBER;
  765.  
  766. // NOTE : 길드를 탈퇴하거나 해체 하지 않는 이상, 클리어 하면 안될거 같음.
  767. //ClearMemberList();
  768.  
  769. m_ebGuildName.SetFocus(FALSE);
  770. m_ebSearch.SetFocus(FALSE);
  771. m_ebWriteSubject.SetFocus(FALSE);
  772. m_ebNoticeTitle.SetFocus(FALSE);
  773. m_ebChangePositionName.SetFocus(FALSE);
  774. m_ebChangePayExp.SetFocus(FALSE);
  775. m_ebChangePayFame.SetFocus(FALSE);
  776. m_ContGuild.clear();
  777.  
  778. CUIManager* pUIManager = CUIManager::getSingleton();
  779.  
  780. pUIManager->RearrangeOrder( UI_GUILD, FALSE );
  781.  
  782. if(pUIManager->GetSimplePop()->IsEnabled())
  783. {
  784. // SIMPLE POP이 열려 있었다면 닫아 준다..
  785. pUIManager->GetSimplePop()->ClosePop();
  786. }
  787. }
  788.  
  789. // ----------------------------------------------------------------------------
  790. // Name : ClearMemberList()
  791. // Desc : 멤버 목록을 클리어합니다.
  792. // ----------------------------------------------------------------------------
  793. void CUIGuild::ClearMemberList()
  794. {
  795. // NOTE : 길드를 탈퇴하거나 해체 하지 않는 이상, 클리어 하면 안될거 같음.
  796. if(!m_vectorMemberList.empty())
  797. {
  798. m_strBossName = "";
  799. m_vectorMemberList.clear();
  800. }
  801. }
  802.  
  803. // ----------------------------------------------------------------------------
  804. // Name : PressOKBtn()
  805. // Desc : 확인 버튼을 눌렀을 때의 처리.
  806. // ----------------------------------------------------------------------------
  807. void CUIGuild::PressOKBtn()
  808. {
  809. switch( m_eGuildState )
  810. {
  811. case GUILD_CREATE: // 길드 생성
  812. CreateGuild();
  813. break;
  814. case GUILD_UPGRADE: // 길드 승급
  815. UpgradeGuild();
  816. break;
  817. case GUILD_DESTROY: // 길드 해체
  818. {
  819. CUIManager* pUIManager = CUIManager::getSingleton();
  820.  
  821. pUIManager->CloseMessageBox(MSGCMD_GUILD_ERROR);
  822. pUIManager->CloseMessageBox(MSGCMD_GUILD_DESTROY);
  823. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN);
  824. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN_REQ);
  825. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT);
  826. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT_CONFIRM);
  827. pUIManager->CloseMessageBox(MSGCMD_GUILD_APPLICANT_JOIN);
  828. pUIManager->CloseMessageBox(MSGCMD_GUILD_ROOM);
  829.  
  830. // Create message box of guild destroy
  831. CTString strMessage;
  832. CUIMsgBox_Info MsgBoxInfo;
  833. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_DESTROY );
  834. strMessage.PrintF( _S( 881, "정말로 [%s] 길드를 해산 하시겠습니까?" ), _pNetwork->MyCharacterInfo.strGuildName );
  835. MsgBoxInfo.AddString( strMessage );
  836. pUIManager->CreateMessageBox( MsgBoxInfo );
  837. }
  838. break;
  839. }
  840. }
  841.  
  842. // ----------------------------------------------------------------------------
  843. // Name : CreateGuild()
  844. // Desc : 길드 생성
  845. // ----------------------------------------------------------------------------
  846. void CUIGuild::CreateGuild()
  847. {
  848. // 길드 생성.
  849. if( m_ebGuildName.GetString() )
  850. {
  851. CUIManager* pUIManager = CUIManager::getSingleton();
  852. m_strGuildName = m_ebGuildName.GetString();
  853.  
  854. if(!pUIManager->checkName(m_strGuildName,1))
  855. {
  856. pUIManager->CloseMessageBox(MSGCMD_GUILD_ERROR);
  857. pUIManager->CloseMessageBox(MSGCMD_GUILD_DESTROY);
  858. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN);
  859. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN_REQ);
  860. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT);
  861. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT_CONFIRM);
  862. pUIManager->CloseMessageBox(MSGCMD_GUILD_APPLICANT_JOIN);
  863. pUIManager->CloseMessageBox(MSGCMD_GUILD_ROOM);
  864.  
  865. m_ebGuildName.ResetString();
  866. m_ebGuildName.SetFocus( TRUE );
  867. return;
  868. }
  869.  
  870. // 길드 생성 메시지 보내기.
  871. _pNetwork->GuildCreate( m_strGuildName );
  872. }
  873. }
  874.  
  875. // ----------------------------------------------------------------------------
  876. // Name : GoGuildZone()
  877. // Desc : 길드 전용 공간으로 이동...
  878. // ----------------------------------------------------------------------------
  879. void CUIGuild::GoGuildZone()
  880. {
  881. const int iGuildZoneID = 8;
  882. if( _pNetwork->MyCharacterInfo.lGuildIndex != GUILD_MEMBER_NOMEMBER )
  883. {
  884. _pNetwork->GoZone( iGuildZoneID, 0 , GUILD_NPC );
  885. }
  886. }
  887.  
  888. // ----------------------------------------------------------------------------
  889. // Name : UpgradeGuild()
  890. // Desc : 길드 승급
  891. // ----------------------------------------------------------------------------
  892. void CUIGuild::UpgradeGuild()
  893. {
  894. _pNetwork->GuildUpgrade();
  895. }
  896.  
  897. // ----------------------------------------------------------------------------
  898. // Name : DestroyGuild()
  899. // Desc : 길드 해체
  900. // ----------------------------------------------------------------------------
  901. void CUIGuild::DestroyGuild()
  902. {
  903. _pNetwork->GuildDestroy();
  904. }
  905.  
  906. static LONG g_lChaIndex = -1; // 가입 신청과 관련된 부분에만 쓰임.
  907. static LONG g_lGuildIndex = -1;
  908. static LONG g_lMemberIndex = -1; // 멤버에 관련된 부분에만 쓰임.
  909.  
  910. // ----------------------------------------------------------------------------
  911. // Name : JoinGuild()
  912. // Desc : 길드 가입
  913. // ----------------------------------------------------------------------------
  914. void CUIGuild::JoinGuild( LONG lGuildIndex, LONG lChaIndex, const CTString& strName, INDEX iSyndiType )
  915. {
  916. CUIManager* pUIManager = CUIManager::getSingleton();
  917.  
  918. pUIManager->CloseMessageBox(MSGCMD_GUILD_ERROR);
  919. pUIManager->CloseMessageBox(MSGCMD_GUILD_DESTROY);
  920. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN);
  921. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN_REQ);
  922. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT);
  923. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT_CONFIRM);
  924. pUIManager->CloseMessageBox(MSGCMD_GUILD_APPLICANT_JOIN);
  925. pUIManager->CloseMessageBox(MSGCMD_GUILD_ROOM);
  926.  
  927. g_lChaIndex = lChaIndex;
  928. g_lGuildIndex = lGuildIndex;
  929. m_iSyndiType = iSyndiType;
  930.  
  931. // Create message box of guild destroy
  932. CTString strMessage;
  933. CUIMsgBox_Info MsgBoxInfo;
  934. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_JOIN );
  935. strMessage.PrintF( _S( 884, "[%s] 길드에 가입 신청을 하시겠습니까?" ), strName );
  936. MsgBoxInfo.AddString( strMessage );
  937. pUIManager->CreateMessageBox( MsgBoxInfo );
  938. }
  939.  
  940. // ----------------------------------------------------------------------------
  941. // Name : QuitGuild()
  942. // Desc : 길드 탈퇴
  943. // ----------------------------------------------------------------------------
  944. void CUIGuild::QuitGuild( )
  945. {
  946. CUIManager* pUIManager = CUIManager::getSingleton();
  947.  
  948. pUIManager->CloseMessageBox(MSGCMD_GUILD_ERROR);
  949. pUIManager->CloseMessageBox(MSGCMD_GUILD_DESTROY);
  950. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN);
  951. pUIManager->CloseMessageBox(MSGCMD_GUILD_JOIN_REQ);
  952. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT);
  953. pUIManager->CloseMessageBox(MSGCMD_GUILD_QUIT_CONFIRM);
  954. pUIManager->CloseMessageBox(MSGCMD_GUILD_APPLICANT_JOIN);
  955. pUIManager->CloseMessageBox(MSGCMD_GUILD_ROOM);
  956.  
  957. // Create message box of guild destroy
  958. CTString strMessage;
  959. CUIMsgBox_Info MsgBoxInfo;
  960. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_QUIT );
  961. strMessage.PrintF( _S( 885, "[%s] 길드를 탈퇴 하시겠습니까?" ), _pNetwork->MyCharacterInfo.strGuildName );
  962. MsgBoxInfo.AddString( strMessage );
  963. pUIManager->CreateMessageBox( MsgBoxInfo );
  964. }
  965.  
  966. // ----------------------------------------------------------------------------
  967. // Name : ChangeBoss()
  968. // Desc : 단장 이임
  969. // ----------------------------------------------------------------------------
  970. void CUIGuild::ChangeBoss()
  971. {
  972. // WSS_NEW_GUILD_SYSTEM 070719
  973. int iSelMember;
  974.  
  975. if(m_iGuildLevel < LIMIT_GUILD_LEVEL)
  976.  
  977. iSelMember = m_lbMemberList.GetCurSel();
  978. else
  979. iSelMember = m_lbManageMemberList.GetCurSel();
  980.  
  981. if( iSelMember == -1 )
  982. return;
  983.  
  984. sGuildMember &TempMember = m_vectorMemberList[iSelMember];
  985. if( _pNetwork->MyCharacterInfo.index == TempMember.lIndex )
  986. return;
  987.  
  988. g_lMemberIndex = TempMember.lIndex;
  989.  
  990. CUIManager* pUIManager = CUIManager::getSingleton();
  991.  
  992. pUIManager->CloseMessageBox( MSGCMD_GUILD_KICK );
  993. pUIManager->CloseMessageBox( MSGCMD_GUILD_CHANGE_BOSS );
  994. pUIManager->CloseMessageBox( MSGCMD_GUILD_ADD_VICE_BOSS );
  995. pUIManager->CloseMessageBox( MSGCMD_GUILD_DEL_VICE_BOSS );
  996.  
  997. // Create message box of guild destroy
  998. CTString strMessage;
  999. CUIMsgBox_Info MsgBoxInfo;
  1000. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_CHANGE_BOSS );
  1001. strMessage.PrintF( _S( 886, "[%s] 에게 길드장을 이임 하시겠습니까?" ), TempMember.strMemberName );
  1002. MsgBoxInfo.AddString( strMessage );
  1003. pUIManager->CreateMessageBox( MsgBoxInfo );
  1004. }
  1005.  
  1006. // ----------------------------------------------------------------------------
  1007. // Name : AddViceBoss()
  1008. // Desc : 부단장 임명
  1009. // ----------------------------------------------------------------------------
  1010. void CUIGuild::AddViceBoss()
  1011. {
  1012. // WSS_NEW_GUILD_SYSTEM 070719
  1013. int iSelMember;
  1014.  
  1015. if(m_iGuildLevel < LIMIT_GUILD_LEVEL)
  1016. iSelMember = m_lbMemberList.GetCurSel();
  1017. else
  1018. iSelMember = m_lbManageMemberList.GetCurSel();
  1019.  
  1020. if( iSelMember != -1 )
  1021. {
  1022. sGuildMember &TempMember = m_vectorMemberList[iSelMember];
  1023. g_lMemberIndex = TempMember.lIndex;
  1024.  
  1025. if( TempMember.eRanking == GUILD_MEMBER_VICE_BOSS )
  1026. {
  1027. return;
  1028. }
  1029.  
  1030. CUIManager* pUIManager = CUIManager::getSingleton();
  1031.  
  1032. pUIManager->CloseMessageBox( MSGCMD_GUILD_KICK );
  1033. pUIManager->CloseMessageBox( MSGCMD_GUILD_CHANGE_BOSS );
  1034. pUIManager->CloseMessageBox( MSGCMD_GUILD_ADD_VICE_BOSS );
  1035. pUIManager->CloseMessageBox( MSGCMD_GUILD_DEL_VICE_BOSS );
  1036.  
  1037. // Create message box of guild destroy
  1038. CTString strMessage;
  1039. CUIMsgBox_Info MsgBoxInfo;
  1040. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_ADD_VICE_BOSS );
  1041. strMessage.PrintF( _S( 887, "[%s]를 길드부장으로 임명 하시겠습니까?" ), TempMember.strMemberName );
  1042. MsgBoxInfo.AddString( strMessage );
  1043. pUIManager->CreateMessageBox( MsgBoxInfo );
  1044. }
  1045. }
  1046.  
  1047. // ----------------------------------------------------------------------------
  1048. // Name : DelViceBoss()
  1049. // Desc : 부단장 해임
  1050. // ----------------------------------------------------------------------------
  1051. void CUIGuild::DelViceBoss()
  1052. {
  1053. // WSS_NEW_GUILD_SYSTEM 070719
  1054. int iSelMember;
  1055. if(m_iGuildLevel < LIMIT_GUILD_LEVEL)
  1056. iSelMember = m_lbMemberList.GetCurSel();
  1057. else
  1058. iSelMember = m_lbManageMemberList.GetCurSel();
  1059.  
  1060. if( iSelMember != -1 )
  1061. {
  1062. sGuildMember &TempMember = m_vectorMemberList[iSelMember];
  1063.  
  1064. // 부단장만 가능함.
  1065. if(TempMember.eRanking != GUILD_MEMBER_VICE_BOSS)
  1066. return;
  1067.  
  1068. g_lMemberIndex = TempMember.lIndex;
  1069.  
  1070. CUIManager* pUIManager = CUIManager::getSingleton();
  1071.  
  1072. pUIManager->CloseMessageBox( MSGCMD_GUILD_KICK );
  1073. pUIManager->CloseMessageBox( MSGCMD_GUILD_CHANGE_BOSS );
  1074. pUIManager->CloseMessageBox( MSGCMD_GUILD_ADD_VICE_BOSS );
  1075. pUIManager->CloseMessageBox( MSGCMD_GUILD_DEL_VICE_BOSS );
  1076.  
  1077. // Create message box of guild destroy
  1078. CTString strMessage;
  1079. CUIMsgBox_Info MsgBoxInfo;
  1080. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_DEL_VICE_BOSS );
  1081. strMessage.PrintF( _S( 888, "[%s]를 길드부장에서 해임 하시겠습니까?" ), TempMember.strMemberName );
  1082. MsgBoxInfo.AddString( strMessage );
  1083. pUIManager->CreateMessageBox( MsgBoxInfo );
  1084. }
  1085. }
  1086.  
  1087. // ----------------------------------------------------------------------------
  1088. // Name : MemberFire()
  1089. // Desc : 단원 퇴출
  1090. // ----------------------------------------------------------------------------
  1091. void CUIGuild::MemberFire()
  1092. {
  1093. // WSS_NEW_GUILD_SYSTEM 070719
  1094. int iSelMember;
  1095.  
  1096. if(m_iGuildLevel < LIMIT_GUILD_LEVEL)
  1097. iSelMember = m_lbMemberList.GetCurSel();
  1098. else
  1099. iSelMember = m_lbManageMemberList.GetCurSel();
  1100.  
  1101. if( iSelMember != -1 )
  1102. {
  1103. sGuildMember &TempMember = m_vectorMemberList[iSelMember];
  1104.  
  1105. // 멤버의 레벨이 자기 레벨보다 높으면 퇴출 못시킴.
  1106. if( TempMember.eRanking < _pNetwork->MyCharacterInfo.lGuildPosition )
  1107. return;
  1108.  
  1109. g_lMemberIndex = TempMember.lIndex;
  1110.  
  1111. CUIManager* pUIManager = CUIManager::getSingleton();
  1112.  
  1113. pUIManager->CloseMessageBox( MSGCMD_GUILD_KICK );
  1114. pUIManager->CloseMessageBox( MSGCMD_GUILD_CHANGE_BOSS );
  1115. pUIManager->CloseMessageBox( MSGCMD_GUILD_ADD_VICE_BOSS );
  1116. pUIManager->CloseMessageBox( MSGCMD_GUILD_DEL_VICE_BOSS );
  1117.  
  1118. // Create message box of guild destroy
  1119. CTString strMessage;
  1120. CUIMsgBox_Info MsgBoxInfo;
  1121. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_KICK );
  1122. strMessage.PrintF( _S( 889, "[%s]를 퇴출 하시겠습니까?" ), TempMember.strMemberName );
  1123. MsgBoxInfo.AddString( strMessage );
  1124. pUIManager->CreateMessageBox( MsgBoxInfo );
  1125. }
  1126. }
  1127.  
  1128. // ----------------------------------------------------------------------------
  1129. // Name : ApplicantAccept()
  1130. // Desc : 가입 승인
  1131. // ----------------------------------------------------------------------------
  1132. void CUIGuild::ApplicantAccept( LONG lIndex )
  1133. {
  1134. CTString strMemberName = "";
  1135.  
  1136. g_lChaIndex = lIndex;
  1137.  
  1138. ObjectBase* pObject = ACTORMGR()->GetObject(eOBJ_CHARACTER, lIndex);
  1139.  
  1140. if (pObject != NULL)
  1141. {
  1142. strMemberName = pObject->m_strName.c_str();
  1143. }
  1144.  
  1145. // Create message box of guild destroy
  1146. CTString strMessage;
  1147. CUIMsgBox_Info MsgBoxInfo;
  1148. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_APPLICANT_JOIN );
  1149. strMessage.PrintF( _S( 890, "[%s] 님께서 가입 신청을 하셨습니다. 수락하시겠습니까?" ), strMemberName );
  1150. MsgBoxInfo.AddString( strMessage );
  1151. CUIManager::getSingleton()->CreateMessageBox( MsgBoxInfo );
  1152. }
  1153.  
  1154. // ----------------------------------------------------------------------------
  1155. // Name : AddToMemberList()
  1156. // Desc : 멤버 목록에 추가
  1157. // ----------------------------------------------------------------------------
  1158. void CUIGuild::AddToMemberList( LONG lIndex, const CTString& strName, int eLevel, BOOL bOnline )
  1159. {
  1160. // 단원이 목록을 보려고 하는 경우...
  1161. /*
  1162. if( m_iUserRanking != GUILD_MEMBER_MEMBER &&
  1163. eLevel == GUILD_MEMBER_BOSS ) // 단장
  1164. {
  1165. m_strBossName = strName;
  1166. }
  1167. else
  1168. */
  1169. {
  1170. sGuildMember TempGuildMember;
  1171. TempGuildMember.lIndex = lIndex;
  1172. TempGuildMember.strMemberName = strName;
  1173. TempGuildMember.eRanking = eLevel;
  1174. TempGuildMember.bOnline = bOnline;
  1175. m_vectorMemberList.push_back(TempGuildMember);
  1176. }
  1177. }
  1178.  
  1179. // ----------------------------------------------------------------------------
  1180. // Name : DelFromMemberList()
  1181. // Desc : 멤버 목록에서 제거
  1182. // ----------------------------------------------------------------------------
  1183. void CUIGuild::DelFromMemberList( LONG lIndex )
  1184. {
  1185. sGuildMember TempGuildMember;
  1186. TempGuildMember.lIndex = lIndex;
  1187. std::vector<sGuildMember>::iterator iter =
  1188. std::find_if(m_vectorMemberList.begin(), m_vectorMemberList.end(), FindMember( TempGuildMember ) );
  1189.  
  1190. if( iter != m_vectorMemberList.end() )
  1191. {
  1192. m_vectorMemberList.erase( iter );
  1193. }
  1194. }
  1195.  
  1196. // ----------------------------------------------------------------------------
  1197. // Name : ChangeMemberLevel()
  1198. // Desc : 멤버의 레벨을 변경함.
  1199. // ----------------------------------------------------------------------------
  1200. void CUIGuild::ChangeMemberLevel( LONG lIndex, int eLevel )
  1201. {
  1202. sGuildMember TempGuildMember;
  1203. TempGuildMember.lIndex = lIndex;
  1204. std::vector<sGuildMember>::iterator iter =
  1205. std::find_if(m_vectorMemberList.begin(), m_vectorMemberList.end(), FindMember( TempGuildMember ) );
  1206.  
  1207. if( iter != m_vectorMemberList.end() )
  1208. {
  1209. (*iter).eRanking = eLevel;
  1210. }
  1211. }
  1212.  
  1213. // ----------------------------------------------------------------------------
  1214. // Name : ChangeMemberOnline()
  1215. // Desc : 멤버의 온라인 상태를 변경함.
  1216. // ----------------------------------------------------------------------------
  1217. void CUIGuild::ChangeMemberOnline( LONG lIndex, BOOL bOnline )
  1218. {
  1219. sGuildMember TempGuildMember;
  1220. TempGuildMember.lIndex = lIndex;
  1221. std::vector<sGuildMember>::iterator iter =
  1222. std::find_if(m_vectorMemberList.begin(), m_vectorMemberList.end(), FindMember( TempGuildMember ) );
  1223.  
  1224. if( iter != m_vectorMemberList.end() )
  1225. {
  1226. (*iter).bOnline = bOnline;
  1227. }
  1228. }
  1229.  
  1230. // ----------------------------------------------------------------------------
  1231. // Name : RefreshMemberList()
  1232. // Desc : 목록을 갱신합니다.
  1233. // ----------------------------------------------------------------------------
  1234. void CUIGuild::RefreshMemberList( BOOL bInit )
  1235. {
  1236. if( !bInit && !IsVisible() )
  1237. return;
  1238.  
  1239. m_lbMemberList.ResetAllStrings();
  1240. std::sort(m_vectorMemberList.begin(), m_vectorMemberList.end());
  1241.  
  1242. CTString strLevel;
  1243. COLOR crLevel;
  1244.  
  1245. int iBossCount = 0;
  1246. int iViceBossCount = 0;
  1247. m_strViceBoss[0] = "";
  1248. m_strViceBoss[1] = "";
  1249. std::vector<sGuildMember>::const_iterator member_end = m_vectorMemberList.end();
  1250. std::vector<sGuildMember>::iterator it = m_vectorMemberList.begin();
  1251. for(it = m_vectorMemberList.begin(); it != member_end; ++it)
  1252. {
  1253. switch( (*it).eRanking )
  1254. {
  1255. case GUILD_MEMBER_BOSS: // 길드장
  1256. {
  1257. strLevel = _S( 891, "길드장" );
  1258. crLevel = 0xFF9533FF;
  1259. ASSERT(iBossCount <= 1 && "Invalid Boss Count");
  1260. m_strBossName = (*it).strMemberName;
  1261. iBossCount++;
  1262.  
  1263. // 단장은 이름이 표시되면 안되므로...
  1264. //continue;
  1265. }
  1266. break;
  1267. case GUILD_MEMBER_VICE_BOSS: // 길드부장
  1268. {
  1269. strLevel = _S( 892, "길드부장" );
  1270. crLevel = 0xFFC672FF;
  1271. ASSERT(iViceBossCount <= 2 && "Invalid Vice-Boss Count");
  1272. m_strViceBoss[iViceBossCount] = (*it).strMemberName;
  1273. iViceBossCount++;
  1274. }
  1275. break;
  1276. case GUILD_MEMBER_MEMBER: // 길드원
  1277. {
  1278. strLevel = _S( 893, "길드원" );
  1279. crLevel = 0xCCCCCCFF;
  1280. }
  1281. break;
  1282. /*
  1283. case GUILD_MEMBER_APPLICANT: // 지원자
  1284. {
  1285. ASSERTALWAYS("호출되어서는 안되는 부분\n");
  1286. strLevel = _S( 894, "지원자" );
  1287. crLevel = 0x9400D6FF;
  1288. }
  1289. break;
  1290. */
  1291. }
  1292.  
  1293. BOOL bOnline = (*it).bOnline;
  1294. m_lbMemberList.AddString( 0, (*it).strMemberName, bOnline ? 0xFFFFFFFF : 0xAAAAAAFF );
  1295. m_lbMemberList.AddString( 1, strLevel, crLevel);
  1296. }
  1297. }
  1298.  
  1299. // ----------------------------------------------------------------------------
  1300. // Name : RefreshApplicantList()
  1301. // Desc : 목록을 갱신합니다.
  1302. // ----------------------------------------------------------------------------
  1303. void CUIGuild::RefreshApplicantList( BOOL bInit )
  1304. {
  1305. if( !bInit && !IsVisible() )
  1306. return;
  1307.  
  1308. m_lbApplicantList.ResetAllStrings();
  1309. std::sort(m_vectorMemberList.begin(), m_vectorMemberList.end());
  1310.  
  1311. CTString strLevel;
  1312. COLOR crLevel;
  1313.  
  1314. m_lbApplicantList.AddString( 0, _S( 895, "온라인" ), 0xBCBCBCFF );
  1315. m_lbApplicantList.AddString( 1, CTString(""), 0xFFFFFFFF);
  1316.  
  1317. int iBossCount = 0;
  1318. int iViceBossCount = 0;
  1319.  
  1320. // On-Line
  1321. std::vector<sGuildMember>::const_iterator member_end = m_vectorMemberList.end();
  1322. std::vector<sGuildMember>::iterator it = m_vectorMemberList.begin();
  1323. for(it = m_vectorMemberList.begin(); it != member_end; ++it)
  1324. {
  1325. if( (*it).bOnline )
  1326. {
  1327. switch( (*it).eRanking )
  1328. {
  1329. case GUILD_MEMBER_BOSS: // 길드장
  1330. {
  1331. strLevel = _S( 891, "길드장" );
  1332. crLevel = 0xFF9533FF;
  1333. ASSERT(iBossCount <= 1 && "Invalid Boss Count");
  1334. m_strBossName = (*it).strMemberName;
  1335. iBossCount++;
  1336. }
  1337. break;
  1338. case GUILD_MEMBER_VICE_BOSS: // 길드부장
  1339. {
  1340. strLevel = _S( 892, "길드부장" );
  1341. crLevel = 0xFFC672FF;
  1342. ASSERT(iViceBossCount <= 2 && "Invalid Vice-Boss Count");
  1343. m_strViceBoss[iViceBossCount] = (*it).strMemberName;
  1344. iViceBossCount++;
  1345. }
  1346. break;
  1347. case GUILD_MEMBER_MEMBER: // 길드원
  1348. {
  1349. strLevel = _S( 893, "길드원" );
  1350. crLevel = 0xCCCCCCFF;
  1351. }
  1352. break;
  1353. /*
  1354. case GUILD_MEMBER_APPLICANT: // 지원자
  1355. {
  1356. ASSERTALWAYS("호출되어서는 안되는 부분\n");
  1357. strLevel = _S( 894, "지원자" );
  1358. crLevel = 0x9400D6FF;
  1359. }
  1360. break;
  1361. */
  1362. }
  1363. m_lbApplicantList.AddString( 0, (*it).strMemberName, 0xFFFFFFFF );
  1364. m_lbApplicantList.AddString( 1, strLevel, crLevel);
  1365. }
  1366. }
  1367.  
  1368. m_lbApplicantList.AddString( 0, CTString(" "), 0xFFFFFFFF );
  1369. m_lbApplicantList.AddString( 1, CTString(""), 0xFFFFFFFF);
  1370.  
  1371. m_lbApplicantList.AddString( 0, _S( 896, "오프라인" ), 0xCCCCCCFF );
  1372. m_lbApplicantList.AddString( 1, CTString(""), 0xFFFFFFFF);
  1373.  
  1374. // Off-Line
  1375. for(it = m_vectorMemberList.begin(); it != member_end; ++it)
  1376. {
  1377. if( !(*it).bOnline )
  1378. {
  1379. switch( (*it).eRanking )
  1380. {
  1381. case GUILD_MEMBER_BOSS: // 길드장
  1382. {
  1383. strLevel = _S( 891, "길드장" );
  1384. crLevel = 0xFF9533FF;
  1385. ASSERT(iBossCount <= 1 && "Invalid Boss Count");
  1386. m_strBossName = (*it).strMemberName;
  1387. iBossCount++;
  1388. }
  1389. break;
  1390. case GUILD_MEMBER_VICE_BOSS: // 길드부장
  1391. {
  1392. strLevel = _S( 892, "길드부장" );
  1393. crLevel = 0xFFC672FF;
  1394. ASSERT(iViceBossCount <= 2 && "Invalid Vice-Boss Count");
  1395. m_strViceBoss[iViceBossCount] = (*it).strMemberName;
  1396. iViceBossCount++;
  1397. }
  1398. break;
  1399. case GUILD_MEMBER_MEMBER: // 길드원
  1400. {
  1401. strLevel = _S( 893, "길드원" );
  1402. crLevel = 0xCCCCCCFF;
  1403. }
  1404. break;
  1405. /*
  1406. case GUILD_MEMBER_APPLICANT: // 지원자
  1407. {
  1408. ASSERTALWAYS("호출되어서는 안되는 부분\n");
  1409. strLevel = _S( 894, "지원자" );
  1410. crLevel = 0x9400D6FF;
  1411. }
  1412. break;
  1413. */
  1414. }
  1415. m_lbApplicantList.AddString( 0, (*it).strMemberName, 0xAAAAAAFF );
  1416. m_lbApplicantList.AddString( 1, strLevel, crLevel);
  1417. }
  1418. }
  1419. }
  1420.  
  1421. // ----------------------------------------------------------------------------
  1422. // Name : GetGuildDesc()
  1423. // Desc :
  1424. // ----------------------------------------------------------------------------
  1425. void CUIGuild::GetGuildDesc( BOOL bShow )
  1426. {
  1427. m_lbGuildDesc.ResetAllStrings();
  1428. SetSize( GUILD_WIDTH, GUILD_HEIGHT );
  1429.  
  1430. if( bShow == FALSE )
  1431. return;
  1432.  
  1433. BOOL bSatisfied = TRUE;
  1434.  
  1435. // Make description of guild
  1436. CTString strTemp = "";
  1437.  
  1438. switch( m_eGuildState )
  1439. {
  1440. case GUILD_CREATE: // 길드 생성
  1441. {
  1442. AddGuildDescString( _S( 897, "길드를 결성 하려는가?" ) );
  1443. AddGuildDescString( _S( 898, "용기 있는 자로군." ) );
  1444. AddGuildDescString( _S( 899, "하지만, 그에 상응하는 비용과 일정 수준의 희생은 감수 해야 하네." ) );
  1445. AddGuildDescString( _S( 900, "그래도 좋다면 승낙하지." ) );
  1446. AddGuildDescString( _S( 901, "이 세상은 혼돈을 끝낼 인재가 필요하니까" ) );
  1447. AddGuildDescString( CTString( " " ) );
  1448.  
  1449. ASSERT( m_iGuildLevel <= MAX_GUILD_LEVEL && "Invalid Guild Level" );
  1450.  
  1451. const int iMyLevel = _pNetwork->MyCharacterInfo.level;
  1452. const SQUAD llMyMoney = _pNetwork->MyCharacterInfo.money;
  1453. const SLONG lMySP = _pNetwork->MyCharacterInfo.sp / 10000;
  1454. const int iNeedLevel = _GuildConditionTable[0].iCaptionNeedLevel;
  1455. const SQUAD llNeedMoney = _GuildConditionTable[0].llNeedMoney;
  1456. const int iNeedSP = _GuildConditionTable[0].iNeedSP;
  1457.  
  1458. strTemp.PrintF( _S( 902, "최대 길드 인원 : %d 명" ), _GuildConditionTable[0].iMaxMember);
  1459. AddGuildDescString( strTemp, 0xFFFFFFFF );
  1460.  
  1461. if( iMyLevel < iNeedLevel )
  1462. {
  1463. bSatisfied = FALSE;
  1464. }
  1465.  
  1466. strTemp.PrintF( _S( 903, "필요 레벨 : %d Lv" ), _GuildConditionTable[0].iCaptionNeedLevel);
  1467. AddGuildDescString( strTemp, iMyLevel >= iNeedLevel ? 0xFFC672FF : 0xBCBCBCFF );
  1468.  
  1469. if( llMyMoney < llNeedMoney )
  1470. {
  1471. bSatisfied = FALSE;
  1472. }
  1473.  
  1474. strTemp.PrintF( _S( 904, "필요 나스 : %I64d 나스" ), _GuildConditionTable[0].llNeedMoney);
  1475. AddGuildDescString( strTemp, llMyMoney >= llNeedMoney ? 0xFFC672FF : 0xBCBCBCFF );
  1476.  
  1477. if( lMySP < iNeedSP )
  1478. {
  1479. bSatisfied = FALSE;
  1480. }
  1481.  
  1482. strTemp.PrintF( _S( 905, "필요 S P : %d SP" ), _GuildConditionTable[0].iNeedSP);
  1483. AddGuildDescString( strTemp, lMySP >= iNeedSP ? 0xFFC672FF : 0xBCBCBCFF );
  1484. }
  1485. break;
  1486. case GUILD_UPGRADE: // 길드 승급
  1487. {
  1488. AddGuildDescString( _S( 906, "일은 잘 되어 가나? 많은 이들이 자네를 따르나 보군." ) );
  1489. AddGuildDescString( _S( 907, "자격이 된다면야 더 많은 사람들을 모으는 건 자네의 능력이네만," ) );
  1490. AddGuildDescString( _S( 908, "만일 자네가 그 많은 사람을 감당할 수 없을 수도 있으니 잘 판단하게." ) );
  1491. AddGuildDescString( CTString( " " ) );
  1492.  
  1493. ASSERT( m_iGuildLevel <= MAX_GUILD_LEVEL && "Invalid Guild Level" );
  1494.  
  1495. const int iMyLevel = _pNetwork->MyCharacterInfo.level;
  1496. const SQUAD llMyMoney = _pNetwork->MyCharacterInfo.money;
  1497. const int lMySP = _pNetwork->MyCharacterInfo.sp / 10000;
  1498. const int iNeedLevel = _GuildConditionTable[m_iGuildLevel].iCaptionNeedLevel;
  1499. const SQUAD llNeedMoney = _GuildConditionTable[m_iGuildLevel].llNeedMoney;
  1500. const int iNeedSP = _GuildConditionTable[m_iGuildLevel].iNeedSP;
  1501.  
  1502. strTemp.PrintF( _S( 909, "현재 길드 레벨 : %d Lv" ), m_iGuildLevel);
  1503. AddGuildDescString( strTemp, 0xFFC672FF );
  1504.  
  1505. strTemp.PrintF( _S( 902, "최대 길드 인원 : %d 명" ), _GuildConditionTable[m_iGuildLevel].iMaxMember);
  1506. AddGuildDescString( strTemp, 0xFFFFFFFF );
  1507.  
  1508. if( iMyLevel < iNeedLevel )
  1509. {
  1510. bSatisfied = FALSE;
  1511. }
  1512.  
  1513. strTemp.PrintF( _S( 903, "필요 레벨 : %d Lv" ), _GuildConditionTable[m_iGuildLevel].iCaptionNeedLevel);
  1514. AddGuildDescString( strTemp, iMyLevel >= iNeedLevel ? 0xFFC672FF : 0xBCBCBCFF );
  1515.  
  1516. if( llMyMoney < llNeedMoney )
  1517. {
  1518. bSatisfied = FALSE;
  1519. }
  1520.  
  1521. strTemp.PrintF( _S( 904, "필요 나스 : %I64d 나스" ), _GuildConditionTable[m_iGuildLevel].llNeedMoney);
  1522. AddGuildDescString( strTemp, llMyMoney >= llNeedMoney ? 0xFFC672FF : 0xBCBCBCFF );
  1523.  
  1524. if( lMySP < iNeedSP )
  1525. {
  1526. bSatisfied = FALSE;
  1527. }
  1528.  
  1529. strTemp.PrintF( _S( 905, "필요 S P : %d SP" ), _GuildConditionTable[m_iGuildLevel].iNeedSP);
  1530. AddGuildDescString( strTemp, lMySP >= iNeedSP ? 0xFFC672FF : 0xBCBCBCFF );
  1531.  
  1532. strTemp.PrintF( _S(3839, "필요 G P : %d GP" ), _GuildConditionTable[m_iGuildLevel].iNeedGP);
  1533. AddGuildDescString( strTemp, 0x70BEFFFF);
  1534. }
  1535. break;
  1536. case GUILD_DESTROY: // 길드 해산
  1537. {
  1538. AddGuildDescString( _S( 910, "자네도 피곤한가 보군." ) );
  1539. AddGuildDescString( _S( 911, "하지만, 지금 그만 둔다면 지금까지 자네를 따랐던 이들의 실망도 크겠지만, " ) );
  1540. AddGuildDescString( _S( 912, "자네 개인적으로도 길드에 들였던 노력이 모두 허사가 되네." ) );
  1541. AddGuildDescString( _S( 913, "그래도 상관 없다면 자네의 뜻대로 하게." ) );
  1542. AddGuildDescString( _S( 914, "지금까지 도와준 것만으로도 자네에게 고마울 따름이니까." ) );
  1543. }
  1544. break;
  1545. }
  1546.  
  1547. m_btnOK.SetEnable( bSatisfied );
  1548. }
  1549.  
  1550. // ----------------------------------------------------------------------------
  1551. // Name : AddGuildDescString()
  1552. // Desc :
  1553. // ----------------------------------------------------------------------------
  1554. void CUIGuild::AddGuildDescString( CTString &strDesc, COLOR colDesc )
  1555. {
  1556. // Get length of string
  1557. INDEX nLength = strDesc.Length();
  1558. if( nLength == 0 )
  1559. return;
  1560.  
  1561. // wooss 051002
  1562. #if defined (THAI)
  1563. // Get length of string
  1564. INDEX nThaiLen = FindThaiLen(strDesc);
  1565. INDEX nChatMax= (_iMaxMsgStringChar-1)*(_pUIFontTexMgr->GetFontWidth()+_pUIFontTexMgr->GetFontSpacing());
  1566. if( nLength == 0 )
  1567. return;
  1568. // If length of string is less than max char
  1569. if( nThaiLen <= nChatMax )
  1570. {
  1571. // Check line character
  1572. for( int iPos = 0; iPos < nLength; iPos++ )
  1573. {
  1574. if( strDesc[iPos] == '\n' || strDesc[iPos] == '\r' )
  1575. break;
  1576. }
  1577.  
  1578. // Not exist
  1579. if( iPos == nLength )
  1580. {
  1581. m_lbGuildDesc.AddString( 0, strDesc, colDesc );
  1582. }
  1583. else
  1584. {
  1585. // Split string
  1586. CTString strTemp, strTemp2;
  1587. strDesc.Split( iPos, strTemp2, strTemp );
  1588. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1589.  
  1590. // Trim line character
  1591. if( strTemp[0] == '\r' && strTemp[1] == '\n' )
  1592. strTemp.TrimLeft( strTemp.Length() - 2 );
  1593. else
  1594. strTemp.TrimLeft( strTemp.Length() - 1 );
  1595.  
  1596. AddGuildDescString( strTemp, colDesc );
  1597. }
  1598. }
  1599. // Need multi-line
  1600. else
  1601. {
  1602. // Check splitting position for 2 byte characters
  1603. int nSplitPos = _iMaxMsgStringChar;
  1604. BOOL b2ByteChar = FALSE;
  1605. for( int iPos = 0; iPos < nLength; iPos++ )
  1606. {
  1607. if(nChatMax < FindThaiLen(strDesc,0,iPos))
  1608. break;
  1609. }
  1610. nSplitPos = iPos;
  1611.  
  1612. // Check line character
  1613. for( iPos = 0; iPos < nSplitPos; iPos++ )
  1614. {
  1615. if( strDesc[iPos] == '\n' || strDesc[iPos] == '\r' )
  1616. break;
  1617. }
  1618.  
  1619. // Not exist
  1620. if( iPos == nSplitPos )
  1621. {
  1622. // Split string
  1623. CTString strTemp, strTemp2;
  1624. strDesc.Split( nSplitPos, strTemp2, strTemp );
  1625. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1626.  
  1627. // Trim space
  1628. if( strTemp[0] == ' ' )
  1629. {
  1630. int nTempLength = strTemp.Length();
  1631. for( iPos = 1; iPos < nTempLength; iPos++ )
  1632. {
  1633. if( strTemp[iPos] != ' ' )
  1634. break;
  1635. }
  1636.  
  1637. strTemp.TrimLeft( strTemp.Length() - iPos );
  1638. }
  1639.  
  1640. AddGuildDescString( strTemp, colDesc );
  1641. }
  1642. else
  1643. {
  1644. // Split string
  1645. CTString strTemp, strTemp2;
  1646. strDesc.Split( iPos, strTemp2, strTemp );
  1647. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1648.  
  1649. // Trim line character
  1650. if( strTemp[0] == '\r' && strTemp[1] == '\n' )
  1651. strTemp.TrimLeft( strTemp.Length() - 2 );
  1652. else
  1653. strTemp.TrimLeft( strTemp.Length() - 1 );
  1654.  
  1655. AddGuildDescString( strTemp, colDesc );
  1656. }
  1657.  
  1658. }
  1659. #else
  1660. // If length of string is less than max char
  1661. if( nLength <= _iMaxMsgStringChar )
  1662. {
  1663. // Check line character
  1664. int iPos;
  1665. for( iPos = 0; iPos < nLength; iPos++ )
  1666. {
  1667. if( strDesc[iPos] == '\n' || strDesc[iPos] == '\r' )
  1668. break;
  1669. }
  1670.  
  1671. // Not exist
  1672. if( iPos == nLength )
  1673. {
  1674. m_lbGuildDesc.AddString( 0, strDesc, colDesc );
  1675. }
  1676. else
  1677. {
  1678. // Split string
  1679. CTString strTemp, strTemp2;
  1680. strDesc.Split( iPos, strTemp2, strTemp );
  1681. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1682.  
  1683. // Trim line character
  1684. if( strTemp[0] == '\r' && strTemp[1] == '\n' )
  1685. strTemp.TrimLeft( strTemp.Length() - 2 );
  1686. else
  1687. strTemp.TrimLeft( strTemp.Length() - 1 );
  1688.  
  1689. AddGuildDescString( strTemp, colDesc );
  1690. }
  1691. }
  1692. // Need multi-line
  1693. else
  1694. {
  1695. // Check splitting position for 2 byte characters
  1696. int nSplitPos = _iMaxMsgStringChar;
  1697. BOOL b2ByteChar = FALSE;
  1698. int iPos;
  1699. for( iPos = 0; iPos < nSplitPos; iPos++ )
  1700. {
  1701. if( strDesc[iPos] & 0x80 )
  1702. b2ByteChar = !b2ByteChar;
  1703. else
  1704. b2ByteChar = FALSE;
  1705. }
  1706.  
  1707. if( b2ByteChar )
  1708. nSplitPos--;
  1709.  
  1710. // Check line character
  1711. for( iPos = 0; iPos < nSplitPos; iPos++ )
  1712. {
  1713. if( strDesc[iPos] == '\n' || strDesc[iPos] == '\r' )
  1714. break;
  1715. }
  1716.  
  1717. // Not exist
  1718. if( iPos == nSplitPos )
  1719. {
  1720. // Split string
  1721. CTString strTemp, strTemp2;
  1722. strDesc.Split( nSplitPos, strTemp2, strTemp );
  1723. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1724.  
  1725. // Trim space
  1726. if( strTemp[0] == ' ' )
  1727. {
  1728. int nTempLength = strTemp.Length();
  1729. for( iPos = 1; iPos < nTempLength; iPos++ )
  1730. {
  1731. if( strTemp[iPos] != ' ' )
  1732. break;
  1733. }
  1734.  
  1735. strTemp.TrimLeft( strTemp.Length() - iPos );
  1736. }
  1737.  
  1738. AddGuildDescString( strTemp, colDesc );
  1739. }
  1740. else
  1741. {
  1742. // Split string
  1743. CTString strTemp, strTemp2;
  1744. strDesc.Split( iPos, strTemp2, strTemp );
  1745. m_lbGuildDesc.AddString( 0, strTemp2, colDesc );
  1746.  
  1747. // Trim line character
  1748. if( strTemp[0] == '\r' && strTemp[1] == '\n' )
  1749. strTemp.TrimLeft( strTemp.Length() - 2 );
  1750. else
  1751. strTemp.TrimLeft( strTemp.Length() - 1 );
  1752.  
  1753. AddGuildDescString( strTemp, colDesc );
  1754. }
  1755. }
  1756. #endif
  1757. }
  1758.  
  1759. // ----------------------------------------------------------------------------
  1760. // Name : Render()
  1761. // Desc :
  1762. // ----------------------------------------------------------------------------
  1763. void CUIGuild::Render()
  1764. {
  1765.  
  1766. // WSS_NEW_GUILD_SYSTEM 070611 ---------------------->>
  1767. if( m_eGuildState == GUILD_MANAGER_NEW )
  1768. {
  1769. RenderNew();
  1770. return;
  1771. }
  1772. // --------------------------------------------------<<
  1773.  
  1774. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  1775.  
  1776. // Set skill learn texture
  1777. pDrawPort->InitTextureData( m_ptdBaseTexture );
  1778.  
  1779. // Add render regions
  1780. int nX, nY, nX2, nY2;
  1781.  
  1782. // Background
  1783. // Top
  1784. nX = m_nPosX + m_nWidth;
  1785. nY = m_nPosY + 26;
  1786. pDrawPort->AddTexture( m_nPosX, m_nPosY, nX, nY,
  1787. m_rtBackTop.U0, m_rtBackTop.V0,
  1788. m_rtBackTop.U1, m_rtBackTop.V1,
  1789. 0xFFFFFFFF );
  1790.  
  1791. if( m_eGuildState != GUILD_MANAGER )
  1792. {
  1793. // Not Manager
  1794. pDrawPort->AddTexture( m_nPosX, nY, nX, nY + DESC_LIST_BOX_HEIGHT + 2,
  1795. m_rtBackMiddle1.U0, m_rtBackMiddle1.V0,
  1796. m_rtBackMiddle1.U1, m_rtBackMiddle1.V1,
  1797. 0xFFFFFFFF );
  1798.  
  1799. nY += DESC_LIST_BOX_HEIGHT + 2;
  1800. }
  1801. else
  1802. {
  1803. // Manager
  1804. pDrawPort->AddTexture( m_nPosX, nY, nX, nY + 37,
  1805. m_rtBackManagerTop.U0, m_rtBackManagerTop.V0,
  1806. m_rtBackManagerTop.U1, m_rtBackManagerTop.V1,
  1807. 0xFFFFFFFF );
  1808.  
  1809. nY += 37;
  1810.  
  1811. if( m_iUserRanking < GUILD_MEMBER_MEMBER )
  1812. {
  1813. pDrawPort->AddTexture( m_nPosX, nY, nX, nY + MEMBER_LIST_BOX_HEIGHT + 2,
  1814. m_rtBackManagerMiddle.U0, m_rtBackManagerMiddle.V0,
  1815. m_rtBackManagerMiddle.U1, m_rtBackManagerMiddle.V1,
  1816. 0xFFFFFFFF );
  1817.  
  1818. nY += MEMBER_LIST_BOX_HEIGHT + 2;
  1819. }
  1820. else
  1821. {
  1822. pDrawPort->AddTexture( m_nPosX, nY, nX, nY + MEMBER_LIST_BOX_HEIGHT * 2 + 2,
  1823. m_rtBackManagerMiddle.U0, m_rtBackManagerMiddle.V0,
  1824. m_rtBackManagerMiddle.U1, m_rtBackManagerMiddle.V1,
  1825. 0xFFFFFFFF );
  1826.  
  1827. nY += MEMBER_LIST_BOX_HEIGHT * 2 + 2;
  1828. }
  1829.  
  1830. pDrawPort->AddTexture( m_nPosX, nY, nX, nY + 4,
  1831. m_rtBackManagerBottom.U0, m_rtBackManagerBottom.V0,
  1832. m_rtBackManagerBottom.U1, m_rtBackManagerBottom.V1,
  1833. 0xFFFFFFFF );
  1834.  
  1835. nY += 4;
  1836. }
  1837.  
  1838. // Middle 2
  1839. pDrawPort->AddTexture( m_nPosX, nY, nX, m_nPosY + m_nHeight - 7,
  1840. m_rtBackMiddle2.U0, m_rtBackMiddle2.V0,
  1841. m_rtBackMiddle2.U1, m_rtBackMiddle2.V1,
  1842. 0xFFFFFFFF );
  1843.  
  1844. // Bottom
  1845. nY = m_nPosY + m_nHeight - 7;
  1846. pDrawPort->AddTexture( m_nPosX, nY, nX, m_nPosY + m_nHeight,
  1847. m_rtBackBottom.U0, m_rtBackBottom.V0,
  1848. m_rtBackBottom.U1, m_rtBackBottom.V1,
  1849. 0xFFFFFFFF );
  1850. // ----------------------------------------------------------------------------
  1851. if( m_eGuildState != GUILD_MANAGER )
  1852. {
  1853. }
  1854. // Guild Manager
  1855. else
  1856. {
  1857. nX = m_nPosX + m_rcTab.Left + GUILD_TAB_WIDTH;
  1858. nY = m_nPosY + m_rcTab.Top;
  1859. nX2 = nX + 1;
  1860. nY2 = nY + 16;
  1861. pDrawPort->AddTexture( nX, nY, nX2, nY2,
  1862. m_rtTab.U0, m_rtTab.V0, m_rtTab.U1, m_rtTab.V1,
  1863. 0xFFFFFFFF );
  1864. }
  1865.  
  1866. // Close button
  1867. m_btnClose.Render();
  1868.  
  1869. // Create Guild
  1870. if(m_eGuildState == GUILD_CREATE)
  1871. {
  1872. // Edit Box
  1873. // Lower left
  1874. nX = m_nPosX + 95;
  1875. nX2 = m_nPosX + m_nWidth - 10;
  1876. nY = m_nPosY + (EDIT_BOX_Y - 3);
  1877. nY2 = nY + 16;
  1878. pDrawPort->AddTexture( nX, nY, nX + 4, nY2,
  1879. m_rtInputBoxL.U0, m_rtInputBoxL.V0, m_rtInputBoxL.U1, m_rtInputBoxL.V1,
  1880. 0xFFFFFFFF );
  1881. // Lower middle
  1882. pDrawPort->AddTexture( nX + 4, nY, nX2 - 4, nY2,
  1883. m_rtInputBoxM.U0, m_rtInputBoxM.V0, m_rtInputBoxM.U1, m_rtInputBoxM.V1,
  1884. 0xFFFFFFFF );
  1885. // Lower right
  1886. pDrawPort->AddTexture( nX2 - 4, nY, nX2, nY2,
  1887. m_rtInputBoxR.U0, m_rtInputBoxR.V0, m_rtInputBoxR.U1, m_rtInputBoxR.V1,
  1888. 0xFFFFFFFF );
  1889.  
  1890. m_ebGuildName.Render();
  1891. }
  1892.  
  1893. if(m_eGuildState != GUILD_MANAGER)
  1894. {
  1895. // OK button
  1896. m_btnOK.Render();
  1897.  
  1898. // Cancel button
  1899. m_btnCancel.Render();
  1900.  
  1901. m_lbGuildDesc.Render();
  1902. }
  1903.  
  1904. if(m_eGuildState == GUILD_MANAGER)
  1905. {
  1906. if(m_nCurrentTab == GUILD_TAB_MEMBER)
  1907. {
  1908. if( m_iUserRanking < GUILD_MEMBER_MEMBER )
  1909. {
  1910. m_lbMemberList.Render();
  1911. m_btnChangeBoss.Render(); // 단장 이임
  1912. m_btnAccept.Render(); // 부단장 임명
  1913. m_btnReject.Render(); // 부단장 해임
  1914. m_btnMemberFire.Render(); // 멤버 퇴출
  1915. }
  1916. else
  1917. {
  1918. m_lbApplicantList.Render();
  1919. }
  1920. }
  1921.  
  1922. m_btnExit.Render();
  1923. }
  1924.  
  1925. // Render all elements
  1926. pDrawPort->FlushRenderingQueue();
  1927.  
  1928. CTString strTitle = "";
  1929. switch( m_eGuildState )
  1930. {
  1931. case GUILD_CREATE :
  1932. strTitle = _S( 915, "길드 결성" );
  1933. break;
  1934. case GUILD_UPGRADE:
  1935. strTitle = _S( 916, "길드 승급" );
  1936. break;
  1937. case GUILD_DESTROY:
  1938. strTitle = _S( 917, "길드 해체" );
  1939. break;
  1940. case GUILD_MANAGER:
  1941. //strTitle = _S( 918, "길드 관리" );
  1942. strTitle.PrintF( _S( 919, "%s 길드 Lv.%d" ), _pNetwork->MyCharacterInfo.strGuildName, _pNetwork->MyCharacterInfo.lGuildLevel );
  1943. break;
  1944. }
  1945.  
  1946. if( m_eGuildState == GUILD_CREATE)
  1947. {
  1948. // Text in guild
  1949. pDrawPort->PutTextEx( _S( 920, "길드 이름" ), m_nPosX + GUILD_TITLE_TEXT_OFFSETX - 4,
  1950. m_nPosY + (EDIT_BOX_Y - 2), 0xFFFFFFFF );
  1951. }
  1952.  
  1953. // Text in guild
  1954. pDrawPort->PutTextEx( strTitle, m_nPosX + GUILD_TITLE_TEXT_OFFSETX,
  1955. m_nPosY + GUILD_TITLE_TEXT_OFFSETY, 0xFFFFFFFF );
  1956.  
  1957. if( m_eGuildState == GUILD_MANAGER)
  1958. {
  1959. // Tab
  1960. nY = m_nPosY + 29;
  1961. nX = m_nPosX + m_rcTab.Left + GUILD_TAB_WIDTH / 2;
  1962. pDrawPort->PutTextExCX( _S( 921, "길드원 관리" ), nX, nY,
  1963. m_nCurrentTab == GUILD_TAB_MEMBER ? 0xE1B300FF : 0x6B6B6BFF );
  1964.  
  1965. nX += GUILD_TAB_WIDTH;
  1966. pDrawPort->PutTextExCX( _S( 922, "군 단" ), nX, nY,
  1967. m_nCurrentTab == GUILD_TAB_TREE ? 0xE1B300FF : 0x6B6B6BFF );
  1968.  
  1969. if( m_nCurrentTab == GUILD_TAB_MEMBER )
  1970. {
  1971. CTString strText;
  1972.  
  1973. CTString strLevel;
  1974. switch(m_iUserRanking)
  1975. {
  1976. case GUILD_MEMBER_BOSS: // 길드장
  1977. {
  1978. strLevel = _S( 891, "길드장" );
  1979. }
  1980. break;
  1981. case GUILD_MEMBER_VICE_BOSS: // 길드부장
  1982. {
  1983. strLevel = _S( 892, "길드부장" );
  1984. }
  1985. break;
  1986. case GUILD_MEMBER_MEMBER: // 길드원
  1987. {
  1988. strLevel = _S( 893, "길드원" );
  1989. }
  1990. break;
  1991. }
  1992.  
  1993. strText.PrintF( "%s %s", _pNetwork->MyCharacterInfo.name, strLevel );
  1994. pDrawPort->PutTextExCX( strText, m_nPosX + (GUILD_WIDTH / 2),
  1995. m_nPosY + 46, 0xFFFFFFFF );
  1996. }
  1997.  
  1998. if( m_iUserRanking != GUILD_MEMBER_MEMBER )
  1999. {
  2000. int nTextY = START_BUTTON_Y + 5;
  2001.  
  2002. // Text in guild
  2003. pDrawPort->PutTextEx( _S( 891, "길드장" ), m_nPosX + 10,
  2004. m_nPosY + nTextY, 0xBCBCBCFF );
  2005.  
  2006. nTextY += SPAN_TEXT_Y;
  2007. pDrawPort->PutTextEx( m_strBossName, m_nPosX + 10,
  2008. m_nPosY + nTextY, 0xFFFFFFFF );
  2009.  
  2010. nTextY += SPAN_TEXT_Y + 4;
  2011. pDrawPort->PutTextEx( _S( 892, "길드부장" ), m_nPosX + 10,
  2012. m_nPosY + nTextY, 0xBCBCBCFF );
  2013.  
  2014. nTextY += SPAN_TEXT_Y;
  2015. pDrawPort->PutTextEx( m_strViceBoss[0], m_nPosX + 10,
  2016. m_nPosY + nTextY, 0xFFFFFFFF );
  2017.  
  2018. nTextY += SPAN_TEXT_Y;
  2019. pDrawPort->PutTextEx( m_strViceBoss[1], m_nPosX + 10,
  2020. m_nPosY + nTextY, 0xFFFFFFFF );
  2021. }
  2022.  
  2023. }
  2024.  
  2025. // Flush all render text queue
  2026. pDrawPort->EndTextEx();
  2027.  
  2028. if(m_eGuildState == GUILD_CREATE)
  2029. {
  2030. // Reading window
  2031. if( m_ebGuildName.DoesShowReadingWindow() )
  2032. {
  2033. // Set texture
  2034. pDrawPort->InitTextureData( m_ptdBaseTexture );
  2035.  
  2036. // Reading window
  2037. m_ebGuildName.RenderReadingWindow();
  2038.  
  2039. // Render all elements
  2040. pDrawPort->FlushRenderingQueue();
  2041.  
  2042. // Flush all render text queue
  2043. pDrawPort->EndTextEx();
  2044. }
  2045. }
  2046.  
  2047. }
  2048.  
  2049. // ----------------------------------------------------------------------------
  2050. // Name : MouseMessage()
  2051. // Desc :
  2052. // ----------------------------------------------------------------------------
  2053. WMSG_RESULT CUIGuild::MouseMessage( MSG *pMsg )
  2054. {
  2055.  
  2056. // TODO : 길드 정보 선택
  2057. // 길드레벨 6이상...
  2058. if( m_eGuildState == GUILD_MANAGER_NEW )
  2059. return MouseMessageNew (pMsg);
  2060.  
  2061.  
  2062. WMSG_RESULT wmsgResult;
  2063.  
  2064. // Title bar
  2065. static BOOL bTitleBarClick = FALSE;
  2066.  
  2067. // Item clicked
  2068. static BOOL bLButtonDownInItem = FALSE;
  2069.  
  2070. // Mouse point
  2071. static int nOldX, nOldY;
  2072. int nX = LOWORD( pMsg->lParam );
  2073. int nY = HIWORD( pMsg->lParam );
  2074.  
  2075. // Mouse message
  2076. switch( pMsg->message )
  2077. {
  2078. case WM_MOUSEMOVE:
  2079. {
  2080. if( IsInside( nX, nY ) )
  2081. CUIManager::getSingleton()->SetMouseCursorInsideUIs();
  2082.  
  2083. int ndX = nX - nOldX;
  2084. int ndY = nY - nOldY;
  2085.  
  2086. // Move shop
  2087. if( bTitleBarClick && ( pMsg->wParam & MK_LBUTTON ) )
  2088. {
  2089. nOldX = nX; nOldY = nY;
  2090.  
  2091. Move( ndX, ndY );
  2092.  
  2093. return WMSG_SUCCESS;
  2094. }
  2095.  
  2096. // Close Button
  2097. if( m_btnClose.MouseMessage( pMsg ) != WMSG_FAIL )
  2098. return WMSG_SUCCESS;
  2099.  
  2100. if( m_eGuildState != GUILD_MANAGER)
  2101. {
  2102. // OK Button
  2103. if( m_btnOK.MouseMessage( pMsg ) != WMSG_FAIL )
  2104. return WMSG_SUCCESS;
  2105. // Cancel Button
  2106. else if( m_btnCancel.MouseMessage( pMsg ) != WMSG_FAIL )
  2107. return WMSG_SUCCESS;
  2108. // List box
  2109. else if( m_lbGuildDesc.MouseMessage( pMsg ) != WMSG_FAIL )
  2110. return WMSG_SUCCESS;
  2111. // Guild Name
  2112. else if( m_eGuildState == GUILD_CREATE && m_ebGuildName.MouseMessage( pMsg ) != WMSG_FAIL )
  2113. {
  2114. return WMSG_SUCCESS;
  2115. }
  2116. }
  2117. else
  2118. {
  2119. if( m_nCurrentTab == GUILD_TAB_MEMBER )
  2120. {
  2121. if( m_iUserRanking < GUILD_MEMBER_MEMBER)
  2122. {
  2123. // Change Boss
  2124. if( m_btnChangeBoss.MouseMessage( pMsg ) != WMSG_FAIL )
  2125. return WMSG_SUCCESS;
  2126. // Accept
  2127. else if( m_btnAccept.MouseMessage( pMsg ) != WMSG_FAIL )
  2128. return WMSG_SUCCESS;
  2129. // Reject
  2130. else if( m_btnReject.MouseMessage( pMsg ) != WMSG_FAIL )
  2131. return WMSG_SUCCESS;
  2132. // Member fire
  2133. else if( m_btnMemberFire.MouseMessage( pMsg ) != WMSG_FAIL )
  2134. return WMSG_SUCCESS;
  2135. // List box
  2136. else if( m_lbMemberList.MouseMessage( pMsg ) != WMSG_FAIL )
  2137. return WMSG_SUCCESS;
  2138. // Exit
  2139. else if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2140. return WMSG_SUCCESS;
  2141. }
  2142. else
  2143. {
  2144. // List box
  2145. if( m_lbApplicantList.MouseMessage( pMsg ) != WMSG_FAIL )
  2146. return WMSG_SUCCESS;
  2147. // Exit
  2148. else if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2149. return WMSG_SUCCESS;
  2150. }
  2151. }
  2152. else if( m_nCurrentTab == GUILD_TAB_TREE )
  2153. {
  2154. // Exit
  2155. if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2156. return WMSG_SUCCESS;
  2157. }
  2158. }
  2159. }
  2160. break;
  2161. case WM_LBUTTONDOWN:
  2162. {
  2163. if( IsInside( nX, nY ) )
  2164. {
  2165. CUIManager* pUIManager = CUIManager::getSingleton();
  2166.  
  2167. nOldX = nX; nOldY = nY;
  2168.  
  2169. // Close button
  2170. if( m_btnClose.MouseMessage( pMsg ) != WMSG_FAIL )
  2171. {
  2172. // Nothing
  2173. }
  2174. // Title bar
  2175. else if( IsInsideRect( nX, nY, m_rcTitle ) )
  2176. {
  2177. bTitleBarClick = TRUE;
  2178. }
  2179. // tab
  2180. else if( m_eGuildState == GUILD_MANAGER && IsInsideRect( nX, nY, m_rcTab ) )
  2181. {
  2182. int nOldTab = m_nCurrentTab;
  2183. int nCurTab = ( nX - m_nPosX - m_rcTab.Left ) / GUILD_TAB_WIDTH;
  2184.  
  2185. if( nCurTab >= 0 && nCurTab < GUILD_TAB_TOTAL )
  2186. {
  2187. m_nCurrentTab = nCurTab;
  2188. }
  2189. }
  2190. else if( m_eGuildState != GUILD_MANAGER )
  2191. {
  2192. // OK Button
  2193. if( m_btnOK.MouseMessage( pMsg ) != WMSG_FAIL )
  2194. return WMSG_SUCCESS;
  2195. // Cancel Button
  2196. else if( m_btnCancel.MouseMessage( pMsg ) != WMSG_FAIL )
  2197. return WMSG_SUCCESS;
  2198. // Guild Name
  2199. else if( (m_eGuildState == GUILD_CREATE) && (m_ebGuildName.MouseMessage( pMsg ) != WMSG_FAIL ) )
  2200. {
  2201. // WSS_NEW_GUILD_SYSTEM 070702
  2202. m_ebGuildName.SetFocus(TRUE);
  2203. // Date : 2005-03-10, By Lee Ki-hwan
  2204. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  2205. return WMSG_SUCCESS;
  2206. }
  2207. // List boxi
  2208. else if( m_lbGuildDesc.MouseMessage( pMsg ) != WMSG_FAIL )
  2209. return WMSG_SUCCESS;
  2210. }
  2211. else
  2212. {
  2213. if( m_nCurrentTab == GUILD_TAB_MEMBER )
  2214. {
  2215. if( m_iUserRanking < GUILD_MEMBER_MEMBER)
  2216. {
  2217. // Change Boss
  2218. if( m_btnChangeBoss.MouseMessage( pMsg ) != WMSG_FAIL )
  2219. return WMSG_SUCCESS;
  2220. // Accept
  2221. else if( m_btnAccept.MouseMessage( pMsg ) != WMSG_FAIL )
  2222. return WMSG_SUCCESS;
  2223. // Reject
  2224. else if( m_btnReject.MouseMessage( pMsg ) != WMSG_FAIL )
  2225. return WMSG_SUCCESS;
  2226. // Member fire
  2227. else if( m_btnMemberFire.MouseMessage( pMsg ) != WMSG_FAIL )
  2228. return WMSG_SUCCESS;
  2229. // List box
  2230. else if( m_lbMemberList.MouseMessage( pMsg ) != WMSG_FAIL )
  2231. return WMSG_SUCCESS;
  2232. // Exit
  2233. else if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2234. return WMSG_SUCCESS;
  2235. }
  2236. else
  2237. {
  2238. // List box
  2239. if( m_lbApplicantList.MouseMessage( pMsg ) != WMSG_FAIL )
  2240. return WMSG_SUCCESS;
  2241. // Exit
  2242. else if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2243. return WMSG_SUCCESS;
  2244. }
  2245. }
  2246. else if( m_nCurrentTab == GUILD_TAB_TREE )
  2247. {
  2248. // Exit
  2249. if( m_btnExit.MouseMessage( pMsg ) != WMSG_FAIL )
  2250. return WMSG_SUCCESS;
  2251. }
  2252. }
  2253.  
  2254. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  2255. return WMSG_SUCCESS;
  2256. }
  2257. }
  2258. break;
  2259. case WM_LBUTTONUP:
  2260. {
  2261. bTitleBarClick = FALSE;
  2262.  
  2263. // Close button
  2264. if( (wmsgResult = m_btnClose.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2265. {
  2266. if(wmsgResult == WMSG_COMMAND)
  2267. {
  2268. ResetGuild();
  2269. }
  2270. return WMSG_SUCCESS;
  2271. }
  2272. else if( m_eGuildState != GUILD_MANAGER )
  2273. {
  2274. // OK Button
  2275. if( (wmsgResult = m_btnOK.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2276. {
  2277. if(wmsgResult == WMSG_COMMAND)
  2278. {
  2279. PressOKBtn();
  2280. }
  2281. return WMSG_SUCCESS;
  2282. }
  2283. // Cancel Button
  2284. else if( (wmsgResult = m_btnCancel.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2285. {
  2286. if(wmsgResult == WMSG_COMMAND)
  2287. {
  2288. ResetGuild();
  2289. }
  2290. return WMSG_SUCCESS;
  2291. }
  2292. // List box
  2293. else if( m_lbGuildDesc.MouseMessage( pMsg ) != WMSG_FAIL )
  2294. {
  2295. return WMSG_SUCCESS;
  2296. }
  2297. }
  2298. else
  2299. {
  2300. if( m_nCurrentTab == GUILD_TAB_MEMBER )
  2301. {
  2302. if( m_iUserRanking < GUILD_MEMBER_MEMBER)
  2303. {
  2304. // Change Boss(단장 이임)
  2305. if( (wmsgResult = m_btnChangeBoss.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2306. {
  2307. if(wmsgResult == WMSG_COMMAND)
  2308. {
  2309. ChangeBoss();
  2310. }
  2311. return WMSG_SUCCESS;
  2312. }
  2313. // Accept(부단장 임명)
  2314. else if( (wmsgResult = m_btnAccept.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2315. {
  2316. if(wmsgResult == WMSG_COMMAND)
  2317. {
  2318. AddViceBoss();
  2319. }
  2320. return WMSG_SUCCESS;
  2321. }
  2322. // Reject(부단장 해임)
  2323. else if( (wmsgResult = m_btnReject.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2324. {
  2325. if(wmsgResult == WMSG_COMMAND)
  2326. {
  2327. DelViceBoss();
  2328. }
  2329. return WMSG_SUCCESS;
  2330. }
  2331. // Member fire(단원 퇴출)
  2332. else if( (wmsgResult = m_btnMemberFire.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2333. {
  2334. if(wmsgResult == WMSG_COMMAND)
  2335. {
  2336. MemberFire();
  2337. }
  2338. return WMSG_SUCCESS;
  2339. }
  2340. // List box
  2341. else if( m_lbMemberList.MouseMessage( pMsg ) != WMSG_FAIL )
  2342. {
  2343. return WMSG_SUCCESS;
  2344. }
  2345. // Exit
  2346. else if( (wmsgResult = m_btnExit.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2347. {
  2348. if(wmsgResult == WMSG_COMMAND)
  2349. {
  2350. ResetGuild();
  2351. }
  2352. return WMSG_SUCCESS;
  2353. }
  2354. }
  2355. else
  2356. {
  2357. // List box
  2358. if( m_lbApplicantList.MouseMessage( pMsg ) != WMSG_FAIL )
  2359. {
  2360. return WMSG_SUCCESS;
  2361. }
  2362. // Exit
  2363. else if( (wmsgResult = m_btnExit.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2364. {
  2365. if(wmsgResult == WMSG_COMMAND)
  2366. {
  2367. ResetGuild();
  2368. }
  2369. return WMSG_SUCCESS;
  2370. }
  2371. }
  2372. }
  2373. else if( m_nCurrentTab == GUILD_TAB_TREE )
  2374. {
  2375. // Exit
  2376. if( (wmsgResult = m_btnExit.MouseMessage( pMsg ) ) != WMSG_FAIL )
  2377. {
  2378. if(wmsgResult == WMSG_COMMAND)
  2379. {
  2380. ResetGuild();
  2381. }
  2382. return WMSG_SUCCESS;
  2383. }
  2384. }
  2385. }
  2386. }
  2387. break;
  2388.  
  2389. case WM_RBUTTONDOWN:
  2390. {
  2391. CUIManager* pUIManager = CUIManager::getSingleton();
  2392.  
  2393. if( m_lbGuildMemberList.IsInside( nX, nY) )
  2394. {
  2395. if (pUIManager->GetGuild()->IsEnabled() && !pUIManager->GetGuild()->IsVisible())
  2396. {
  2397. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  2398. }
  2399.  
  2400. CTString strTargetName;
  2401. switch(m_iSelTab)
  2402. {
  2403. case NEW_GUILD_MEMBER_INFO:
  2404. {
  2405. int nAddPos = m_lbGuildMemberList.GetScrollBarPos();
  2406.  
  2407. if (nAddPos < 0)
  2408. nAddPos = 0;
  2409.  
  2410. return OpenGuildPop(m_lbGuildMemberList.GetCurOverList() + nAddPos, nX, nY);
  2411. }
  2412. break;
  2413. }
  2414. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  2415. return WMSG_SUCCESS;
  2416. }
  2417. else
  2418. {
  2419. pUIManager->GetSimplePop()->ClosePop();
  2420. }
  2421. }
  2422. break;
  2423. case WM_MOUSEWHEEL:
  2424. {
  2425. if( IsInside( nX, nY ) )
  2426. {
  2427. if( m_eGuildState != GUILD_MANAGER )
  2428. {
  2429. // List box of guild desc
  2430. if( m_lbGuildDesc.MouseMessage( pMsg ) != WMSG_FAIL )
  2431. return WMSG_SUCCESS;
  2432. }
  2433. else
  2434. {
  2435. if( m_nCurrentTab == GUILD_TAB_MEMBER )
  2436. {
  2437. if( m_iUserRanking < GUILD_MEMBER_MEMBER)
  2438. {
  2439. // List box of member list
  2440. if( m_lbMemberList.MouseMessage( pMsg ) != WMSG_FAIL )
  2441. return WMSG_SUCCESS;
  2442. }
  2443. else
  2444. {
  2445. // List box of member list
  2446. if( m_lbApplicantList.MouseMessage( pMsg ) != WMSG_FAIL )
  2447. return WMSG_SUCCESS;
  2448. }
  2449. }
  2450. }
  2451. }
  2452. }
  2453. break;
  2454.  
  2455. }
  2456. return WMSG_FAIL;
  2457. }
  2458.  
  2459. // ----------------------------------------------------------------------------
  2460. // Name : KeyMessage()
  2461. // Desc :
  2462. // ----------------------------------------------------------------------------
  2463. WMSG_RESULT CUIGuild::KeyMessage( MSG *pMsg )
  2464. {
  2465. if( !IsFocused() )
  2466. return WMSG_FAIL;
  2467.  
  2468. if( m_iGuildLevel < LIMIT_GUILD_LEVEL )
  2469. {
  2470. if( m_ebGuildName.KeyMessage( pMsg ) != WMSG_FAIL )
  2471. {
  2472. return WMSG_SUCCESS;
  2473. }
  2474. }
  2475. else
  2476. {
  2477.  
  2478. switch(m_iSelTab)
  2479. {
  2480. case NEW_GUILD_NOTICE:
  2481. {
  2482. if( m_ebNoticeTitle.KeyMessage( pMsg ) != WMSG_FAIL )
  2483. {
  2484. return WMSG_SUCCESS;
  2485. }
  2486. if( m_mebNoticeContent.KeyMessage( pMsg ) != WMSG_FAIL )
  2487. {
  2488. return WMSG_SUCCESS;
  2489. }
  2490. if( pMsg->wParam == VK_TAB )
  2491. {
  2492. if( m_ebNoticeTitle.IsFocused() )
  2493. {
  2494. m_ebNoticeTitle.SetFocus( FALSE );
  2495. m_mebNoticeContent.SetFocus( TRUE );
  2496. }
  2497. else if( m_mebNoticeContent.IsFocused() )
  2498. {
  2499. m_ebNoticeTitle.SetFocus( TRUE );
  2500. m_mebNoticeContent.SetFocus( FALSE );
  2501. }
  2502. return WMSG_SUCCESS;
  2503. }
  2504. }
  2505. break;
  2506. case NEW_GUILD_MANAGE:
  2507. {
  2508. if(m_bApplySettingOn)
  2509. {
  2510. if( m_ebChangePositionName.KeyMessage( pMsg ) != WMSG_FAIL )
  2511. {
  2512. return WMSG_SUCCESS;
  2513. }
  2514. if( m_ebChangePayExp.KeyMessage( pMsg ) != WMSG_FAIL )
  2515. {
  2516. return WMSG_SUCCESS;
  2517. }
  2518. if( m_ebChangePayFame.KeyMessage( pMsg ) != WMSG_FAIL )
  2519. {
  2520. return WMSG_SUCCESS;
  2521. }
  2522.  
  2523. if( pMsg->wParam == VK_TAB )
  2524. {
  2525. if( m_ebChangePositionName.IsFocused() )
  2526. {
  2527. m_ebChangePositionName.SetFocus( FALSE );
  2528. m_ebChangePayExp.SetFocus( TRUE );
  2529. m_ebChangePayFame.SetFocus( FALSE );
  2530. }
  2531. else if( m_ebChangePayExp.IsFocused() )
  2532. {
  2533. m_ebChangePositionName.SetFocus( FALSE );
  2534. m_ebChangePayExp.SetFocus( FALSE );
  2535. m_ebChangePayFame.SetFocus( TRUE );
  2536. }
  2537. else if( m_ebChangePayFame.IsFocused() )
  2538. {
  2539. m_ebChangePositionName.SetFocus( TRUE );
  2540. m_ebChangePayExp.SetFocus( FALSE );
  2541. m_ebChangePayFame.SetFocus( FALSE );
  2542. }
  2543.  
  2544. return WMSG_SUCCESS;
  2545. }
  2546. }
  2547. }
  2548. break;
  2549. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  2550. case NEW_GUILD_BOARD:
  2551. {
  2552. // List
  2553. if( pWEB->m_nCurBoardType == UWT_LIST )
  2554. {
  2555. if( pMsg->wParam == VK_RETURN )
  2556. {
  2557. if( m_ebSearch.IsFocused() )
  2558. {
  2559. pWEB->m_nWantPage = 1;
  2560. pWEB->DelayCommandPrepare(new CCommandList);
  2561. return WMSG_SUCCESS;
  2562. }
  2563. }
  2564. // Search edit box
  2565. if( m_ebSearch.KeyMessage( pMsg ) != WMSG_FAIL )
  2566. return WMSG_SUCCESS;
  2567. }
  2568. else if( pWEB->m_nCurBoardType >= UWT_WRITE && pWEB->m_nCurBoardType <= UWT_MODIFY )
  2569. {
  2570. // 이기환 수정 시작(05.01.01) : 제목과 내용 사이에 TAB키로 포커스 이동
  2571. if( pMsg->wParam == VK_TAB )
  2572. {
  2573. if( m_ebWriteSubject.IsFocused() )
  2574. {
  2575. m_ebWriteSubject.SetFocus ( FALSE );
  2576. m_mebContent.SetFocus ( TRUE );
  2577.  
  2578. }
  2579. else if( m_mebContent.IsFocused() )
  2580. {
  2581. m_ebWriteSubject.SetFocus ( TRUE );
  2582. m_mebContent.SetFocus ( FALSE );
  2583. }
  2584. return WMSG_SUCCESS;
  2585. }
  2586. // 이기환 수정 끝 :
  2587.  
  2588.  
  2589. // 이기환 수정 시작(05.01.01) : 멀티 에디트 박스 루틴 추가
  2590. // Subject edit box
  2591. if ( m_ebWriteSubject.KeyMessage ( pMsg ) != WMSG_FAIL )
  2592. return WMSG_SUCCESS;
  2593. // Content multi-edit box
  2594. else if ( m_mebContent.KeyMessage ( pMsg ) != WMSG_FAIL )
  2595. {
  2596. return WMSG_SUCCESS;
  2597. }
  2598. // 이기환 수정 끝
  2599. }
  2600. }
  2601. break;
  2602. #endif
  2603. }
  2604. }
  2605. return WMSG_FAIL;
  2606. }
  2607.  
  2608. // ----------------------------------------------------------------------------
  2609. // Name : IMEMessage()
  2610. // Desc :
  2611. // ----------------------------------------------------------------------------
  2612. WMSG_RESULT CUIGuild::IMEMessage( MSG *pMsg )
  2613. {
  2614. if( m_iGuildLevel < LIMIT_GUILD_LEVEL )
  2615. {
  2616. if(m_ebGuildName.IsFocused())
  2617. return m_ebGuildName.IMEMessage( pMsg );
  2618. }
  2619. else {
  2620. switch(m_iSelTab)
  2621. {
  2622. case NEW_GUILD_NOTICE:
  2623. {
  2624. if(m_ebNoticeTitle.IsFocused())
  2625. return m_ebNoticeTitle.IMEMessage( pMsg );
  2626. if(m_mebNoticeContent.IsFocused())
  2627. return m_mebNoticeContent.IMEMessage( pMsg );
  2628. }
  2629. break;
  2630. case NEW_GUILD_MANAGE:
  2631. {
  2632. if(m_bApplySettingOn)
  2633. {
  2634. if(m_ebChangePositionName.IsFocused())
  2635. return m_ebChangePositionName.IMEMessage( pMsg );
  2636. if(m_ebChangePayExp.IsFocused())
  2637. return m_ebChangePayExp.IMEMessage( pMsg );
  2638. if(m_ebChangePayFame.IsFocused())
  2639. return m_ebChangePayFame.IMEMessage( pMsg );
  2640. }
  2641. }
  2642. break;
  2643. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  2644. case NEW_GUILD_BOARD:
  2645. {
  2646. // List
  2647. if( pWEB->m_nCurBoardType == UWT_LIST )
  2648. {
  2649. // Search edit box
  2650. return m_ebSearch.IMEMessage( pMsg );
  2651. }
  2652. else if( pWEB->m_nCurBoardType >= UWT_WRITE && pWEB->m_nCurBoardType <= UWT_MODIFY )
  2653. {
  2654. // Subject edit box
  2655. WMSG_RESULT wmsgResult;
  2656. if ( ( wmsgResult = m_ebWriteSubject.IMEMessage( pMsg ) ) != WMSG_FAIL )
  2657. {
  2658. return wmsgResult;
  2659. }
  2660.  
  2661. if (m_mebContent.GetAllStringLength() >= 1024)
  2662. {
  2663. return WMSG_FAIL;
  2664. }
  2665.  
  2666. // Content multi-edit box
  2667. return m_mebContent.IMEMessage ( pMsg );
  2668. }
  2669. }
  2670. break;
  2671. #endif
  2672. }
  2673. }
  2674. return WMSG_FAIL;
  2675. }
  2676.  
  2677. // ----------------------------------------------------------------------------
  2678. // Name : CharMessage()
  2679. // Desc :
  2680. // ----------------------------------------------------------------------------
  2681. WMSG_RESULT CUIGuild::CharMessage( MSG *pMsg )
  2682. {
  2683. if( m_iGuildLevel < LIMIT_GUILD_LEVEL )
  2684. {
  2685. if( m_ebGuildName.CharMessage( pMsg ) != WMSG_FAIL )
  2686. {
  2687. return WMSG_SUCCESS;
  2688. }
  2689.  
  2690. }
  2691. else
  2692. {
  2693. switch(m_iSelTab)
  2694. {
  2695. case NEW_GUILD_NOTICE:
  2696. {
  2697. if( m_ebNoticeTitle.CharMessage( pMsg ) != WMSG_FAIL )
  2698. {
  2699. return WMSG_SUCCESS;
  2700. }
  2701. if( m_mebNoticeContent.CharMessage( pMsg ) != WMSG_FAIL )
  2702. {
  2703. return WMSG_SUCCESS;
  2704. }
  2705. }
  2706. break;
  2707. case NEW_GUILD_MANAGE:
  2708. {
  2709. if(m_bApplySettingOn)
  2710. {
  2711. if( m_ebChangePositionName.CharMessage( pMsg ) != WMSG_FAIL )
  2712. {
  2713. return WMSG_SUCCESS;
  2714. }
  2715. if( m_ebChangePayExp.CharMessage( pMsg ) != WMSG_FAIL )
  2716. {
  2717. return WMSG_SUCCESS;
  2718. }
  2719. if( m_ebChangePayFame.CharMessage( pMsg ) != WMSG_FAIL )
  2720. {
  2721. return WMSG_SUCCESS;
  2722. }
  2723.  
  2724. }
  2725. }
  2726. break;
  2727. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  2728. case NEW_GUILD_BOARD:
  2729. {
  2730. // List
  2731. if( pWEB->m_nCurBoardType == UWT_LIST )
  2732. {
  2733. // Search edit box
  2734. if( m_ebSearch.CharMessage( pMsg ) != WMSG_FAIL )
  2735. return WMSG_SUCCESS;
  2736. }
  2737. else if( pWEB->m_nCurBoardType >= UWT_WRITE && pWEB->m_nCurBoardType <= UWT_MODIFY )
  2738. {
  2739. // Subject edit box
  2740. if( m_ebWriteSubject.CharMessage( pMsg ) != WMSG_FAIL )
  2741. return WMSG_SUCCESS;
  2742. // 이기환 수정 시작(05.01.01) : 멀티 에디트 박스 루틴 추가
  2743.  
  2744. if (m_mebContent.GetAllStringLength() >= 1024)
  2745. {
  2746. return WMSG_FAIL;
  2747. }
  2748.  
  2749. // Content multi-edit box
  2750. if ( m_mebContent.CharMessage ( pMsg ) != WMSG_FAIL )
  2751. {
  2752. return WMSG_SUCCESS;
  2753. }
  2754. }
  2755. }
  2756. break;
  2757. #endif
  2758.  
  2759. }
  2760.  
  2761. }
  2762. return WMSG_FAIL;
  2763. }
  2764.  
  2765. // ----------------------------------------------------------------------------
  2766. // Name : MsgBoxCommand()
  2767. // Desc :
  2768. // ----------------------------------------------------------------------------
  2769. void CUIGuild::MsgBoxCommand( int nCommandCode, BOOL bOK, CTString &strInput )
  2770. {
  2771. CUIManager* pUIManager = CUIManager::getSingleton();
  2772.  
  2773. switch( nCommandCode )
  2774. {
  2775. case MSGCMD_GUILD_ERROR: // 에러 발생
  2776. {
  2777. if( !bOK )
  2778. return;
  2779. }
  2780. break;
  2781. case MSGCMD_GUILD_JOIN: // 길드 가입
  2782. {
  2783. if( !bOK )
  2784. return;
  2785.  
  2786. // if (_pNetwork->IsRvrZone() && _pNetwork->MyCharacterInfo.iSyndicateType != m_iSyndiType)
  2787. // {
  2788. // pUIManager->GetChattingUI()->AddSysMessage( _S( 6090, "분쟁 지역에서 적대 관계인 경우 사용할 수 없는 기능입니다." ), SYSMSG_ERROR );
  2789. // return;
  2790. // }
  2791.  
  2792. CTString strMessage;
  2793. CUIMsgBox_Info MsgBoxInfo;
  2794. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ) , UMBS_CANCEL, UI_GUILD, MSGCMD_GUILD_JOIN_REQ );
  2795. strMessage.PrintF( _S( 923, "길드 가입 신청중입니다." ) );
  2796. MsgBoxInfo.AddString( strMessage );
  2797. pUIManager->CreateMessageBox( MsgBoxInfo );
  2798.  
  2799. _pNetwork->GuildJoin( g_lGuildIndex, g_lChaIndex, _pNetwork->MyCharacterInfo.index );
  2800. }
  2801. break;
  2802. case MSGCMD_GUILD_JOIN_REQ:
  2803. {
  2804. // 단장이 취소하면 1 아니면 0
  2805. _pNetwork->GuildApplicantReject( FALSE );
  2806. }
  2807. break;
  2808. case MSGCMD_GUILD_QUIT: // 길드 탈퇴
  2809. {
  2810. if( !bOK )
  2811. return;
  2812. // Create message box of guild destroy
  2813. CTString strMessage;
  2814. CUIMsgBox_Info MsgBoxInfo;
  2815. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_QUIT_CONFIRM );
  2816. strMessage.PrintF( _S( 924, "정말로 길드에서 탈퇴하시겠습니까? 탈퇴하시면 7일 동안 길드에 가입하실 수 없습니다." ) );
  2817. MsgBoxInfo.AddString( strMessage );
  2818. pUIManager->CreateMessageBox( MsgBoxInfo );
  2819. }
  2820. break;
  2821. case MSGCMD_GUILD_QUIT_CONFIRM: // 탈퇴 확인
  2822. {
  2823. if( !bOK )
  2824. return;
  2825. _pNetwork->GuildQuit();
  2826. }
  2827. break;
  2828. case MSGCMD_GUILD_DESTROY: // 길드 해산
  2829. {
  2830. if( !bOK )
  2831. return;
  2832. DestroyGuild();
  2833. }
  2834. break;
  2835. case MSGCMD_GUILD_APPLICANT_JOIN: // 신청자 참여.
  2836. {
  2837. if( !bOK )
  2838. // 단장이 취소하면 1 아니면 0
  2839. _pNetwork->GuildApplicantReject( TRUE ); // 가입 거부
  2840. else
  2841. _pNetwork->GuildApplicantAccept( g_lChaIndex ); // 가입 허용
  2842. }
  2843. break;
  2844.  
  2845. case MSGCMD_GUILD_ADD_VICE_BOSS: // 부관 임명
  2846. {
  2847. if( !bOK )
  2848. return;
  2849. _pNetwork->GuildAddViceBoss( g_lMemberIndex );
  2850. }
  2851. break;
  2852. case MSGCMD_GUILD_DEL_VICE_BOSS: // 부관 해임
  2853. {
  2854. if( !bOK )
  2855. return;
  2856. _pNetwork->GuildDelViceBoss( g_lMemberIndex );
  2857. }
  2858. break;
  2859. case MSGCMD_GUILD_CHANGE_BOSS: // 단장 이임
  2860. {
  2861. if( !bOK )
  2862. return;
  2863. _pNetwork->GuildChangeBoss( g_lMemberIndex );
  2864. }
  2865. break;
  2866. case MSGCMD_GUILD_KICK: // 멤버 짜르기
  2867. {
  2868. if( !bOK )
  2869. return;
  2870. _pNetwork->GuildMemberFire( g_lMemberIndex );
  2871. }
  2872. break;
  2873. case MSGCMD_GUILD_ROOM: // 길드 전용 공간으로...
  2874. {
  2875. if( !bOK )
  2876. return;
  2877. GoGuildZone();
  2878. }
  2879. break;
  2880. // 1107 길드 시스템 개편 [trylord 11/12/28]
  2881. case MSGCMD_GUILDMASTER_KICK_REQUEST:
  2882. {
  2883. if( !bOK )
  2884. break;
  2885.  
  2886. _pNetwork->SendGuildMasterKickReq(_pNetwork->MyCharacterInfo.lGuildIndex);
  2887. }
  2888. break;
  2889.  
  2890. case MSGCMD_GUILDMASTER_KICK_CANCEL_REQUEST:
  2891. {
  2892. if( !bOK )
  2893. break;
  2894.  
  2895. _pNetwork->SendGuildMasterKickCancelReq(_pNetwork->MyCharacterInfo.lGuildIndex);
  2896. }
  2897. break;
  2898.  
  2899. case MSGCMD_GUILDREMOTE_JOIN_TOUSER:
  2900. {
  2901. if( !bOK )
  2902. {
  2903. _pNetwork->SendGuildRemoteJoinNOReq();
  2904. }
  2905. else
  2906. {
  2907. _pNetwork->SendGuildRemoteJoinOKReq(GetRemoteGuildJoinTaget(), 1);
  2908. }
  2909. }
  2910. break;
  2911.  
  2912. case MSGCMD_GUILDREMOTE_JOIN_TOMASTER:
  2913. {
  2914. if( !bOK )
  2915. {
  2916. _pNetwork->SendGuildRemoteJoinNOReq();
  2917. }
  2918. else
  2919. {
  2920. _pNetwork->SendGuildRemoteJoinOKReq(GetRemoteGuildJoinTaget(), 0);
  2921. }
  2922. }
  2923. break;
  2924.  
  2925. case MSGCMD_GUILD_RECALL:
  2926. {
  2927. if (bOK)
  2928. {
  2929. _pNetwork->SendGuildRecallReq();
  2930. }
  2931. }
  2932. break;
  2933.  
  2934. case MSGCMD_GUILD_RECALL_USE_REQ:
  2935. {
  2936. if (bOK)
  2937. {
  2938. pUIManager->GetCharacterInfo()->UseSkill( DEF_GUILD_RECALL_SKILL_IDX );
  2939. }
  2940. }
  2941. break;
  2942. }
  2943. }
  2944.  
  2945. // ----------------------------------------------------------------------------
  2946. // Name : MsgBoxLCommand()
  2947. // Desc :
  2948. // ----------------------------------------------------------------------------
  2949. void CUIGuild::MsgBoxLCommand( int nCommandCode, int nResult )
  2950. {
  2951. switch( nCommandCode )
  2952. {
  2953. case MSGLCMD_GUILD_REQ:
  2954. {
  2955. // [090527: selo] 확장팩 퀘스트 이야기 한다 처리 수정을 위한 루틴
  2956. int iQuestIndex = -1;
  2957. if( ciQuestClassifier < nResult )
  2958. {
  2959. iQuestIndex = nResult;
  2960. nResult = ciQuestClassifier;
  2961. }
  2962.  
  2963. switch ( nResult )
  2964. {
  2965. case SEL_GUILD_CREATE:
  2966. {
  2967. // 길드 멤버가 아닐때만 길드 생성함.
  2968. if( m_iUserRanking == GUILD_MEMBER_NOMEMBER )
  2969. {
  2970. m_eGuildState = GUILD_CREATE;
  2971. GetGuildDesc( TRUE );
  2972. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, TRUE );
  2973. }
  2974. else
  2975. {
  2976. m_eGuildState = GUILD_REQ;
  2977. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, FALSE );
  2978. }
  2979. }
  2980. break;
  2981.  
  2982. case SEL_GUILD_DESTROY:
  2983. {
  2984. m_eGuildState = GUILD_DESTROY;
  2985. GetGuildDesc( TRUE );
  2986. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, TRUE );
  2987. }
  2988. break;
  2989.  
  2990. case SEL_GUILD_UPGRADE: // 길드 승급
  2991. {
  2992. if( m_iGuildLevel < MAX_GUILD_LEVEL )
  2993. {
  2994. m_eGuildState = GUILD_UPGRADE;
  2995. GetGuildDesc( TRUE );
  2996. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, TRUE );
  2997. }
  2998. else
  2999. {
  3000. m_eGuildState = GUILD_REQ;
  3001. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, FALSE );
  3002. }
  3003. }
  3004. break;
  3005.  
  3006. case SEL_GUILD_ROOM:
  3007. {
  3008. CUIManager::getSingleton()->CloseMessageBox( MSGCMD_GUILD_ROOM );
  3009. CTString strMessage;
  3010. CUIMsgBox_Info MsgBoxInfo;
  3011. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_ROOM );
  3012. strMessage.PrintF( _S( 1012, "길드 대화방으로 이동하시겠습니까?" ) );
  3013. MsgBoxInfo.AddString( strMessage );
  3014. CUIManager::getSingleton()->CreateMessageBox( MsgBoxInfo );
  3015. }
  3016. break;
  3017.  
  3018. case SEL_GUILD_TALK:
  3019. {
  3020. // 퀘스트 창 띄우기
  3021. //CUIManager::getSingleton()->GetQuest()->OpenQuest( CUIManager::getSingleton()->GetCharacterInfo()->GetMobIndex(), m_fNpcX, m_fNpcZ );
  3022. CUIQuestBook::TalkWithNPC();
  3023. }
  3024. break;
  3025.  
  3026. // [2010/06/30 : Sora] 성주 길드 버프부여
  3027. case SEL_GUILD_BUFF:
  3028. {
  3029. _pNetwork->SendOwnerGuildBuffReq();
  3030. }
  3031. break;
  3032.  
  3033. // [090527: selo] 확장팩 퀘스트 수정
  3034. case ciQuestClassifier:
  3035. {
  3036. // 선택한 퀘스트에 대해 수락 또는 보상 창을 연다.
  3037. CUIQuestBook::SelectQuestFromMessageBox( iQuestIndex );
  3038. }
  3039. break;
  3040. // ==> 1107 길드 시스템 개편 [trylord 11/12/28]
  3041. case SEL_GUILDMASTER_KICK_REQUEST:
  3042. { // 길드장 해임 신청
  3043. CUIManager::getSingleton()->CloseMessageBox( SEL_GUILDMASTER_KICK_REQUEST );
  3044. CTString strMessage;
  3045. CUIMsgBox_Info MsgBoxInfo;
  3046. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILDMASTER_KICK_REQUEST );
  3047. strMessage.PrintF( _S(5615, "[%s] 길드의 길드장 해임 심사를 신청 하시겠습니까?"), _pNetwork->MyCharacterInfo.strGuildName );
  3048. MsgBoxInfo.AddString( strMessage );
  3049. CUIManager::getSingleton()->CreateMessageBox( MsgBoxInfo );
  3050. }
  3051. break;
  3052.  
  3053. case SEL_GUILDMASTER_KICK_CANCEL_REQUEST:
  3054. { // 길드장 해임 이의 신청
  3055. if(_pNetwork->MyCharacterInfo.lGuildPosition != GUILD_MEMBER_BOSS)
  3056. { // 길드장이 아닐 때
  3057. CUIManager::getSingleton()->CloseMessageBox( MSGCMD_GUILD_ERROR );
  3058. CUIMsgBox_Info MsgBoxInfo;
  3059. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ) , UMBS_OK, UI_GUILD, MSGCMD_GUILD_ERROR ); // 확인만 하면 되므로 MSGCMD_GUILD_ERROR ㄱㄱㅅ
  3060. MsgBoxInfo.AddString( _S(5616, "길드장만 이의제기가 가능합니다." ));
  3061. CUIManager::getSingleton()->CreateMessageBox( MsgBoxInfo );
  3062.  
  3063. return;
  3064. }
  3065.  
  3066. CUIManager::getSingleton()->CloseMessageBox( SEL_GUILDMASTER_KICK_CANCEL_REQUEST );
  3067. CTString strMessage;
  3068. CUIMsgBox_Info MsgBoxInfo;
  3069. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILDMASTER_KICK_CANCEL_REQUEST );
  3070. strMessage.PrintF( _S(5617, "길드장 해임에 이의제기를 하시겠습니까?") );
  3071. MsgBoxInfo.AddString( strMessage );
  3072. CUIManager::getSingleton()->CreateMessageBox( MsgBoxInfo );
  3073. }
  3074. break;
  3075. // <== 1107 길드 시스템 개편 [trylord 11/12/28]
  3076.  
  3077. default: // 취소
  3078. {
  3079. m_eGuildState = GUILD_REQ;
  3080. CUIManager::getSingleton()->RearrangeOrder( UI_GUILD, FALSE );
  3081. }
  3082. break;
  3083. }
  3084. }
  3085. }
  3086. }
  3087.  
  3088.  
  3089. void CUIGuild::SetMemberName(int charIndex,CTString strName)
  3090. {
  3091. std::vector<sGuildMember>::iterator iBegin,iEnd,iNext;
  3092. iBegin = iNext = m_vectorMemberList.begin();
  3093. iEnd = m_vectorMemberList.end();
  3094. for( ; iNext != iEnd ; iNext++)
  3095. {
  3096. if(iNext->lIndex == charIndex){
  3097. iNext->strMemberName = strName;
  3098. return;
  3099. }
  3100. }
  3101.  
  3102.  
  3103.  
  3104. }
  3105.  
  3106. // 길드 시스템 추가 작업 ------------------------------------------------------------------------------------------->>
  3107. // WSS_NEW_GUILD_SYSTEM 070703
  3108.  
  3109. // ----------------------------------------------------------------------------
  3110. // Name : InitNewGuildSystem()
  3111. // Desc :
  3112. // ----------------------------------------------------------------------------
  3113. void CUIGuild::InitNewGuildSystem()
  3114. {
  3115. m_iSelTab = 0; // 디폴트 텝
  3116. m_iGuildAverageLevel = 0; // 길드 평균 레벨
  3117. m_iGuildOwnLand = 0; // 길드 소유 영지
  3118. m_iGuildTotalPoint = 0; // 길드 총 포인트
  3119. m_iGuildMyPoint = 0; // 나의 기여 포인트
  3120. m_bApplySettingOn = FALSE; // 설정 변경창 상태
  3121. m_iOnlineMembers = 0; // 접속한 길드원
  3122. m_iGuildSkillPos = 0;
  3123. m_bIsSelList = FALSE;
  3124. m_bEnableCorrect = FALSE; // 공지사항 수정여부
  3125. m_lbMemberAllianceList.ResetAllStrings();
  3126. m_lbMemberHostilityList.ResetAllStrings();
  3127. m_lbGuildMemberList.ResetAllStrings();
  3128. m_lbGuildMemberList.Reset();
  3129. m_sbGuildSkillBar.SetScrollPos(0);
  3130. m_ebNoticeTitle.ResetString();
  3131. m_mebNoticeContent.ResetString();
  3132. m_lbManageMemberList.ResetAllStrings();
  3133. m_lbGuildSkillDesc.ResetAllStrings();
  3134. m_ebSearch.ResetString();
  3135. m_lbListContent.ResetAllStrings();
  3136. m_lbReadContent.ResetAllStrings();
  3137. m_ebWriteSubject.ResetString();
  3138. m_mebContent.ResetString();
  3139.  
  3140. // Init Web Board
  3141. pWEB->m_nCurSection = UWS_GUILD;
  3142. pWEB->m_nCurBoardType = UWT_LIST;
  3143. pWEB->m_nWantModifyMode = UWM_WRITE;
  3144. pWEB->m_nCurrentPage = 0;
  3145.  
  3146. m_nSelSkillTab = GUILD_SKILL_PASSIVE;
  3147. m_sbGuildSkillBar.SetCurItemCount(m_vecGuildPassiveSkill.size());
  3148.  
  3149. // [1/3/2011 kiny8216] NEW_CORPS
  3150. m_iCorpsMember = 0;
  3151. m_iCorpsBoss = 0;
  3152. }
  3153.  
  3154. // ----------------------------------------------------------------------------
  3155. // Name : CreateNew()
  3156. // Desc :
  3157. // ----------------------------------------------------------------------------
  3158. void CUIGuild::CreateNew( CUIWindow *pParentWnd, int nX, int nY)
  3159. {
  3160. int i;
  3161. // Region of each part
  3162. m_rcTitleNew.SetRect( 0, 0, NEW_GUILD_SYSTEM_WIDTH-35, 22 );
  3163. m_rcWindowNew.SetRect( 0, 0, NEW_GUILD_SYSTEM_WIDTH, NEW_GUILD_SYSTEM_HEIGHT );
  3164. for( i = 0; i < MAX_GUILDINFO_TAB; i++ )
  3165. {
  3166. m_rcTabNew[i].SetRect( 98*i+7, 27, 98*(i+1)+6, 47 );
  3167. }
  3168.  
  3169. // window position
  3170. // SetPos( nX, nY );
  3171. // SetSize( NEW_GUILD_SYSTEM_WIDTH, NEW_GUILD_SYSTEM_HEIGHT );
  3172.  
  3173. // Create texture
  3174. ASSERT(m_ptdBaseTexture!=NULL);
  3175. FLOAT fTexWidth = m_ptdBaseTexture->GetPixWidth();
  3176. FLOAT fTexHeight = m_ptdBaseTexture->GetPixHeight();
  3177.  
  3178.  
  3179. // 길드 정보 --------------------------------------------->>
  3180. // UV Coordinate of each part
  3181.  
  3182. // Set Box
  3183. m_bxBackGroundBox.SetBoxUV(m_ptdBaseTexture,30,22,WRect(0,0,216,22));
  3184. m_bxBackGroundBox2.SetBoxUV(m_ptdBaseTexture,20,11,WRect(0,22,216,45));
  3185. m_bxBox1.SetBoxUV(m_ptdBaseTexture,3,WRect(0,68,34,102));
  3186. m_bxBox1_1.SetBoxUV(m_ptdBaseTexture,3,WRect(0,68,32,100));
  3187. m_bxBox1_2.SetBoxUV(m_ptdBaseTexture,3,WRect(0,72,36,102));
  3188. m_bxBox2.SetBoxUV(m_ptdBaseTexture,3,WRect(42,86,245,105));
  3189.  
  3190. // List box of Alliance List
  3191. m_lbMemberAllianceList.Create( this, 287,151,135,133, _pUIFontTexMgr->GetLineHeight(), 13, 3, 2, TRUE );
  3192. m_lbMemberAllianceList.CreateScroll( TRUE, 0, 0, 9, 133, 9, 7, 0, 0, 10 );
  3193. m_lbMemberAllianceList.SetSelBar( 129 , _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  3194. m_lbMemberAllianceList.SetOverColor( 0xF8E1B5FF );
  3195. m_lbMemberAllianceList.SetSelectColor( 0xF8E1B5FF );
  3196. m_lbMemberAllianceList.SetColumnPosX( 1, 110 );
  3197. // Up button
  3198. m_lbMemberAllianceList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3199. m_lbMemberAllianceList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3200. m_lbMemberAllianceList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3201. m_lbMemberAllianceList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3202. // Down button
  3203. m_lbMemberAllianceList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3204. m_lbMemberAllianceList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3205. m_lbMemberAllianceList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3206. m_lbMemberAllianceList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3207. // Bar button
  3208. m_lbMemberAllianceList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3209. m_lbMemberAllianceList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3210. m_lbMemberAllianceList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3211.  
  3212. // List box of Hostility List
  3213. m_lbMemberHostilityList.Create( this, 437, 151, 135, 133, _pUIFontTexMgr->GetLineHeight(), 13, 3, 2, TRUE );
  3214. m_lbMemberHostilityList.CreateScroll( TRUE, 0, 0, 9, 133, 9, 7, 0, 0, 10 );
  3215. m_lbMemberHostilityList.SetSelBar( 129 , _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  3216. m_lbMemberHostilityList.SetOverColor( 0xF8E1B5FF );
  3217. m_lbMemberHostilityList.SetSelectColor( 0xF8E1B5FF );
  3218. m_lbMemberHostilityList.SetColumnPosX( 1, 110 );
  3219. // Up button
  3220. m_lbMemberHostilityList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3221. m_lbMemberHostilityList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3222. m_lbMemberHostilityList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3223. m_lbMemberHostilityList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3224. // Down button
  3225. m_lbMemberHostilityList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3226. m_lbMemberHostilityList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3227. m_lbMemberHostilityList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3228. m_lbMemberHostilityList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3229. // Bar button
  3230. m_lbMemberHostilityList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3231. m_lbMemberHostilityList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3232. m_lbMemberHostilityList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3233.  
  3234. // Background
  3235. m_uvTabNew.SetUV( 0, 0, 216, 26, fTexWidth, fTexHeight );
  3236.  
  3237. // Lines
  3238. m_uvLineH.SetUV(43,86,244,86,fTexWidth,fTexHeight);
  3239. m_uvLineV.SetUV(43,86,43,103,fTexWidth,fTexHeight);
  3240.  
  3241. // Buttons
  3242. // Close button
  3243. m_btnCloseNew.Create( this, CTString( "" ), 572, 5, 14, 14 );
  3244. m_btnCloseNew.SetUV( UBS_IDLE, 219, 0, 233, 14, fTexWidth, fTexHeight );
  3245. m_btnCloseNew.SetUV( UBS_CLICK, 234, 0, 248, 14, fTexWidth, fTexHeight );
  3246. m_btnCloseNew.CopyUV( UBS_IDLE, UBS_ON );
  3247. m_btnCloseNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3248. // Exit button
  3249. m_btnExitNew.Create( this, _S( 870, "닫기" ), 523,308, 63, 21 );
  3250. m_btnExitNew.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  3251. m_btnExitNew.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  3252. m_btnExitNew.CopyUV( UBS_IDLE, UBS_ON );
  3253. m_btnExitNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3254. // Edit button
  3255. m_btnEdit.Create( this, _S(3840, "편집" ), 215, 255, 63, 21 );
  3256. m_btnEdit.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  3257. m_btnEdit.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  3258. m_btnEdit.CopyUV( UBS_IDLE, UBS_ON );
  3259. m_btnEdit.CopyUV( UBS_IDLE, UBS_DISABLE );
  3260. // Guild Mark button
  3261. m_btnGuildMarkBack.Create( this, CTString(""), 26, 244, 33, 33 );
  3262. m_btnGuildMarkBack.SetUV( UBS_IDLE, 0, 46, 63, 67, fTexWidth, fTexHeight );
  3263. m_btnGuildMarkBack.SetUV( UBS_CLICK, 66, 46, 129, 67, fTexWidth, fTexHeight );
  3264. m_btnGuildMarkBack.CopyUV( UBS_IDLE, UBS_ON );
  3265. m_btnGuildMarkBack.CopyUV( UBS_IDLE, UBS_DISABLE );
  3266. // ---------------------------------------------------------<<
  3267.  
  3268. // 길드원 정보 --------------------------------------------->>
  3269. // Member List
  3270. m_lbGuildMemberList.Create( this, 20, 78, 553, 161, _pUIFontTexMgr->GetLineHeight(), 13, 3, 8, TRUE );
  3271. m_lbGuildMemberList.CreateScroll( TRUE, 0, 0, 9, 161, 9, 7, 0, 0, 10 );
  3272. m_lbGuildMemberList.SetSelBar( 553 , _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  3273. m_lbGuildMemberList.SetOverColor( 0xF8E1B5FF );
  3274. m_lbGuildMemberList.SetSelectColor( 0xF8E1B5FF );
  3275. m_lbGuildMemberList.SetColumnPosX( 0, 0 );
  3276. m_lbGuildMemberList.SetColumnPosX( 1, 63 ,TEXT_CENTER);
  3277. m_lbGuildMemberList.SetColumnPosX( 2, 150 ,TEXT_CENTER);
  3278. m_lbGuildMemberList.SetColumnPosX( 3, 208 ,TEXT_CENTER);
  3279. m_lbGuildMemberList.SetColumnPosX( 4, 270 ,TEXT_CENTER);
  3280. m_lbGuildMemberList.SetColumnPosX( 5, 356 ,TEXT_CENTER);
  3281. m_lbGuildMemberList.SetColumnPosX( 6, 421 ,TEXT_CENTER);
  3282. m_lbGuildMemberList.SetColumnPosX( 7, 534,TEXT_RIGHT);
  3283.  
  3284. // Up button
  3285. m_lbGuildMemberList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3286. m_lbGuildMemberList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3287. m_lbGuildMemberList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3288. m_lbGuildMemberList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3289. // Down button
  3290. m_lbGuildMemberList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3291. m_lbGuildMemberList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3292. m_lbGuildMemberList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3293. m_lbGuildMemberList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3294. // Bar button
  3295. m_lbGuildMemberList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3296. m_lbGuildMemberList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3297. m_lbGuildMemberList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3298.  
  3299. // -----------------------------------------------------------<<
  3300.  
  3301. // 길드 스킬 ------------------------------------------------->>
  3302. // Get Skill
  3303. m_btnGetSkill.Create( this, _S(3841, "습득하기" ), 450, 256, 100, 21 );
  3304. m_btnGetSkill.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3305. m_btnGetSkill.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3306. m_btnGetSkill.CopyUV( UBS_IDLE, UBS_ON );
  3307. m_btnGetSkill.CopyUV( UBS_IDLE, UBS_DISABLE );
  3308.  
  3309. // Left Skill Info scroll bar
  3310. m_sbGuildSkillBar.Create( this, 251, 59, 9, 219 );
  3311. m_sbGuildSkillBar.CreateButtons( TRUE, 9, 7, 0, 0, 10 );
  3312. m_sbGuildSkillBar.SetScrollPos( 0 );
  3313. m_sbGuildSkillBar.SetCurItemCount( 0 );
  3314. m_sbGuildSkillBar.SetItemsPerPage( 5 );
  3315. // Up button
  3316. m_sbGuildSkillBar.SetUpUV( UBS_IDLE, 228, 16, 237, 22, fTexWidth, fTexHeight );
  3317. m_sbGuildSkillBar.SetUpUV( UBS_CLICK, 228, 33, 237, 39, fTexWidth, fTexHeight );
  3318. m_sbGuildSkillBar.CopyUpUV( UBS_IDLE, UBS_ON );
  3319. m_sbGuildSkillBar.CopyUpUV( UBS_IDLE, UBS_DISABLE );
  3320. // Down button
  3321. m_sbGuildSkillBar.SetDownUV( UBS_IDLE, 228, 25, 237, 32, fTexWidth, fTexHeight );
  3322. m_sbGuildSkillBar.SetDownUV( UBS_CLICK, 228, 42, 237, 49, fTexWidth, fTexHeight );
  3323. m_sbGuildSkillBar.CopyDownUV( UBS_IDLE, UBS_ON );
  3324. m_sbGuildSkillBar.CopyDownUV( UBS_IDLE, UBS_DISABLE );
  3325. // Bar button
  3326. m_sbGuildSkillBar.SetBarTopUV( 217, 16, 226, 25, fTexWidth, fTexHeight );
  3327. m_sbGuildSkillBar.SetBarMiddleUV( 217, 26, 226, 30, fTexWidth, fTexHeight );
  3328. m_sbGuildSkillBar.SetBarBottomUV( 217, 31, 226, 41, fTexWidth, fTexHeight );
  3329. // Wheel region
  3330. m_sbGuildSkillBar.SetWheelRect( -203, 0, 213, 218 );
  3331.  
  3332. // Member List
  3333. m_lbGuildSkillDesc.Create( this, 274, 78, 293, 75, _pUIFontTexMgr->GetLineHeight(), 5, 3, 1, FALSE );
  3334. m_lbGuildSkillDesc.CreateScroll( TRUE, 0, 0, 9, 75, 9, 7, 0, 0, 10 );
  3335. // Up button
  3336. m_lbGuildSkillDesc.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3337. m_lbGuildSkillDesc.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3338. m_lbGuildSkillDesc.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3339. m_lbGuildSkillDesc.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3340. // Down button
  3341. m_lbGuildSkillDesc.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3342. m_lbGuildSkillDesc.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3343. m_lbGuildSkillDesc.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3344. m_lbGuildSkillDesc.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3345. // Bar button
  3346. m_lbGuildSkillDesc.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3347. m_lbGuildSkillDesc.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3348. m_lbGuildSkillDesc.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3349. m_rcGuildSkillList.SetRect( 48, 69, 241, 269 );
  3350. // -----------------------------------------------------------<<
  3351.  
  3352. // 길드 게시판 ----------------------------------------------->>
  3353. m_bxBox3.SetBoxUV(m_ptdBaseTexture,3,WRect(147,47,159,59));
  3354. m_bxBox4.SetBoxUV(m_ptdBaseTexture,3,WRect(55,162,71,177));
  3355.  
  3356. // Prev button
  3357. m_btnPrev.Create( this, CTString( "" ), 0, 0, 10, 10 );
  3358. m_btnPrev.SetUV( UBS_IDLE, 242, 162, 230, 172, fTexWidth, fTexHeight );
  3359. m_btnPrev.SetUV( UBS_CLICK, 230, 147, 242, 159, fTexWidth, fTexHeight );
  3360. m_btnPrev.CopyUV( UBS_IDLE, UBS_ON );
  3361. m_btnPrev.CopyUV( UBS_IDLE, UBS_DISABLE );
  3362.  
  3363. // Next button
  3364. m_btnNext.Create( this, CTString( "" ), 0, 0, 10, 10 );
  3365. m_btnNext.SetUV( UBS_IDLE, 230, 172, 242, 162,fTexWidth, fTexHeight );
  3366. m_btnNext.SetUV( UBS_CLICK, 242, 159, 230, 147, fTexWidth, fTexHeight );
  3367. m_btnNext.CopyUV( UBS_IDLE, UBS_ON );
  3368. m_btnNext.CopyUV( UBS_IDLE, UBS_DISABLE );
  3369.  
  3370. // Search button
  3371. m_btnSearch.Create( this, _S( 386, "검색" ), 392, 270, 63, 21 );
  3372. m_btnSearch.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3373. m_btnSearch.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3374. m_btnSearch.CopyUV( UBS_IDLE, UBS_ON );
  3375. m_btnSearch.CopyUV( UBS_IDLE, UBS_DISABLE );
  3376. // List button
  3377. m_btnList.Create( this, _S( 313, "목록" ), 23, 270, 63, 21 );
  3378. m_btnList.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3379. m_btnList.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3380. m_btnList.CopyUV( UBS_IDLE, UBS_ON );
  3381. m_btnList.CopyUV( UBS_IDLE, UBS_DISABLE );
  3382.  
  3383. // Write button
  3384. m_btnWrite.Create( this, _S( 314, "쓰기" ), 503, 270, 63, 21 );
  3385. m_btnWrite.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3386. m_btnWrite.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3387. m_btnWrite.CopyUV( UBS_IDLE, UBS_ON );
  3388. m_btnWrite.CopyUV( UBS_IDLE, UBS_DISABLE );
  3389.  
  3390. // Reply button
  3391. m_btnReply.Create( this, _S( 321, "답글" ), 377, 270, 63, 21 );
  3392. m_btnReply.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3393. m_btnReply.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3394. m_btnReply.CopyUV( UBS_IDLE, UBS_ON );
  3395. m_btnReply.CopyUV( UBS_IDLE, UBS_DISABLE );
  3396.  
  3397. // Delete button
  3398. m_btnDelete.Create( this, _S( 338, "삭제" ), 446, 270, 63, 21 );
  3399. m_btnDelete.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3400. m_btnDelete.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3401. m_btnDelete.CopyUV( UBS_IDLE, UBS_ON );
  3402. m_btnDelete.CopyUV( UBS_IDLE, UBS_DISABLE );
  3403.  
  3404. // Modify button
  3405. m_btnModify.Create( this, _S( 339, "수정" ), 515, 270, 63, 21 );
  3406. m_btnModify.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3407. m_btnModify.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3408. m_btnModify.CopyUV( UBS_IDLE, UBS_ON );
  3409. m_btnModify.CopyUV( UBS_IDLE, UBS_DISABLE );
  3410.  
  3411. // Page buttons
  3412. for( i = 0; i < 10; i++ )
  3413. {
  3414. m_btnPage[i].Create( this, CTString( "10" ), 0, 0, 0, 0 );
  3415. m_btnPage[i].SetTextColor( UBS_IDLE, 0x9EB19AFF );
  3416. m_btnPage[i].SetTextColor( UBS_ON, 0xFFD13CFF );
  3417. m_btnPage[i].SetTextColor( UBS_CLICK, 0xFFD13CFF );
  3418. m_btnPage[i].SetTextColor( UBS_DISABLE, 0xFFFFCAFF );
  3419. }
  3420.  
  3421. // List box of list type
  3422. m_lbListContent.Create( this, 15, 75, 532, 174, 18, 0, 9, 5, TRUE );
  3423. m_lbListContent.SetOverColor( 0xFFD13CFF );
  3424. m_lbListContent.SetSelectColor( 0xFFD13CFF );
  3425. m_lbListContent.SetColumnPosX( 0, 30, TEXT_CENTER ); // No
  3426. m_lbListContent.SetColumnPosX( 1, 60 ); // Subject
  3427. m_lbListContent.SetColumnPosX( 2, 345, TEXT_CENTER ); // Name
  3428. m_lbListContent.SetColumnPosX( 3, 425, TEXT_CENTER ); // Date
  3429. m_lbListContent.SetColumnPosX( 4, 504, TEXT_CENTER ); // Hit
  3430.  
  3431. // List box of read type
  3432. m_lbReadContent.Create( this, 24, 112, 537, 137, _pUIFontTexMgr->GetLineHeight()+5, 3, 3, 1, FALSE );
  3433. m_lbReadContent.CreateScroll( TRUE, 0, 0, 9, 137, 9, 7, 0, 0, 10 );
  3434. // Up button
  3435. m_lbReadContent.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3436. m_lbReadContent.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3437. m_lbReadContent.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3438. m_lbReadContent.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3439. // Down button
  3440. m_lbReadContent.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3441. m_lbReadContent.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3442. m_lbReadContent.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3443. m_lbReadContent.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3444. // Bar button
  3445. m_lbReadContent.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3446. m_lbReadContent.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3447. m_lbReadContent.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3448.  
  3449. // Search combobox
  3450. m_cmbSearch.Create( this, 150, 271, 77, 15, 63, 1, 13, 13,
  3451. 2, _pUIFontTexMgr->GetFontHeight() + 4, 4, 4 );
  3452. m_cmbSearch.SetBackUV( 54, 162, 72, 177, fTexWidth, fTexHeight );
  3453. m_cmbSearch.SetDownBtnUV( 230, 162, 242, 172, fTexWidth, fTexHeight );
  3454. m_cmbSearch.SetUpBtnUV( 242, 172, 230, 162, fTexWidth, fTexHeight );
  3455. m_cmbSearch.SetDropListUV( 54, 162, 70, 176, fTexWidth, fTexHeight );
  3456. m_cmbSearch.AddString( _S( 341, "제목" ) );
  3457. m_cmbSearch.AddString( _S( 244, "작성자" ) );
  3458. m_cmbSearch.SetCurSel( 0 );
  3459.  
  3460. // Search edit box
  3461. m_ebSearch.Create( this, 233, 271, 145, 16, 32 );
  3462. m_ebSearch.SetReadingWindowUV( 55, 162, 71, 177, fTexWidth, fTexHeight );
  3463. m_ebSearch.SetCandidateUV( 55,162,71,177, fTexWidth, fTexHeight );
  3464.  
  3465. // Subject edit box in writing
  3466. m_ebWriteSubject.Create( this, 112, 80, 375, 16, 80 );
  3467. m_ebWriteSubject.SetReadingWindowUV( 153, 98, 170, 114, fTexWidth, fTexHeight );
  3468. m_ebWriteSubject.SetCandidateUV( 153, 98, 170, 114, fTexWidth, fTexHeight );
  3469.  
  3470. m_mebContent.Create ( this, 111, 117, 444, 128 , 20 );
  3471.  
  3472. // -----------------------------------------------------------<<
  3473.  
  3474. // 길드 공지 입력--------------------------------------------->>
  3475. m_ebNoticeTitle.Create( this, 84, 75, 470, 16, MAX_NOTICE_TITLE ); // 제목
  3476. m_ebNoticeTitle.SetReadingWindowUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3477. m_ebNoticeTitle.SetCandidateUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3478. m_mebNoticeContent.Create ( this, 82, 115, 465, 135, 20 );
  3479. // 공지 버튼
  3480. m_btnNotice.Create( this, _S(3842, "공지하기" ), 80, 261, 100, 21 );
  3481. m_btnNotice.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3482. m_btnNotice.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3483. m_btnNotice.CopyUV( UBS_IDLE, UBS_ON );
  3484. m_btnNotice.CopyUV( UBS_IDLE, UBS_DISABLE );
  3485. // 수정 버튼
  3486. m_btnNoticeCorrect.Create( this, _S(3843, "수정하기" ) , 340, 261 , 100, 21 );
  3487. m_btnNoticeCorrect.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3488. m_btnNoticeCorrect.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3489. m_btnNoticeCorrect.CopyUV( UBS_IDLE, UBS_ON );
  3490. m_btnNoticeCorrect.CopyUV( UBS_IDLE, UBS_DISABLE );
  3491. // 작성완료 버튼
  3492. m_btnUpdateNotice.Create( this, _S(3844, "작성완료" ) , 454, 261 , 100, 21 );
  3493. m_btnUpdateNotice.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3494. m_btnUpdateNotice.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3495. m_btnUpdateNotice.CopyUV( UBS_IDLE, UBS_ON );
  3496. m_btnUpdateNotice.CopyUV( UBS_IDLE, UBS_DISABLE );
  3497.  
  3498. // -----------------------------------------------------------<<
  3499.  
  3500. // 길드 관리 ------------------------------------------------->>
  3501. // Buttons
  3502. // Change Boss button
  3503. m_btnChangeBossNew.Create( this, _S( 871, "길드장 이임" ), 20, 265, 100, 21 );
  3504. m_btnChangeBossNew.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3505. m_btnChangeBossNew.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3506. m_btnChangeBossNew.CopyUV( UBS_IDLE, UBS_ON );
  3507. m_btnChangeBossNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3508.  
  3509. // Accept button
  3510. m_btnAcceptNew.Create( this, _S( 872, "길드부장 임명" ), 138, 265, 100, 21 );
  3511. m_btnAcceptNew.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3512. m_btnAcceptNew.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3513. m_btnAcceptNew.CopyUV( UBS_IDLE, UBS_ON );
  3514. m_btnAcceptNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3515.  
  3516. // Reject button
  3517. m_btnRejectNew.Create( this, _S( 873, "길드부장 해임" ), 254, 265, 100, 21 );
  3518. m_btnRejectNew.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3519. m_btnRejectNew.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3520. m_btnRejectNew.CopyUV( UBS_IDLE, UBS_ON );
  3521. m_btnRejectNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3522.  
  3523. // MemberQuit button
  3524. m_btnMemberFireNew.Create( this, _S( 874, "길드원 퇴출" ), 372, 265, 100, 21 );
  3525. m_btnMemberFireNew.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3526. m_btnMemberFireNew.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3527. m_btnMemberFireNew.CopyUV( UBS_IDLE, UBS_ON );
  3528. m_btnMemberFireNew.CopyUV( UBS_IDLE, UBS_DISABLE );
  3529.  
  3530. // MemberQuit button
  3531. m_btnChangeSetting.Create( this, _S(3845, "설정 변경" ), 488, 265, 100, 21 );
  3532. m_btnChangeSetting.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3533. m_btnChangeSetting.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3534. m_btnChangeSetting.CopyUV( UBS_IDLE, UBS_ON );
  3535. m_btnChangeSetting.CopyUV( UBS_IDLE, UBS_DISABLE );
  3536.  
  3537. // Member List
  3538. #ifdef ENABLE_GUILD_STASH
  3539. m_lbManageMemberList.Create( this, 20, 78, 553, 161, _pUIFontTexMgr->GetLineHeight(), 13, 3, 7, TRUE );
  3540. #else
  3541. m_lbManageMemberList.Create( this, 20, 78, 553, 161, _pUIFontTexMgr->GetLineHeight(), 13, 3, 6, TRUE );
  3542. #endif
  3543. m_lbManageMemberList.CreateScroll( TRUE, 0, 0, 9, 161, 9, 7, 0, 0, 10 );
  3544. m_lbManageMemberList.SetSelBar( 553 , _pUIFontTexMgr->GetLineHeight(), 187, 46, 204, 61, fTexWidth, fTexHeight );
  3545. m_lbManageMemberList.SetOverColor( 0xF8E1B5FF );
  3546. m_lbManageMemberList.SetSelectColor( 0xF8E1B5FF );
  3547. #ifdef ENABLE_GUILD_STASH
  3548. m_lbManageMemberList.SetColumnPosX( 0, 27 ,TEXT_CENTER);
  3549. m_lbManageMemberList.SetColumnPosX( 1, 112 ,TEXT_CENTER);
  3550. m_lbManageMemberList.SetColumnPosX( 2, 177 ,TEXT_CENTER);
  3551. m_lbManageMemberList.SetColumnPosX( 3, 256 ,TEXT_CENTER);
  3552. m_lbManageMemberList.SetColumnPosX( 4, 387 ,TEXT_RIGHT);
  3553. m_lbManageMemberList.SetColumnPosX( 5, 468 ,TEXT_RIGHT);
  3554. m_lbManageMemberList.SetColumnPosX( 6, 515 ,TEXT_RIGHT);
  3555. #else
  3556. m_lbManageMemberList.SetColumnPosX( 0, 27 ,TEXT_CENTER);
  3557. m_lbManageMemberList.SetColumnPosX( 1, 112 ,TEXT_CENTER);
  3558. m_lbManageMemberList.SetColumnPosX( 2, 177 ,TEXT_CENTER);
  3559. m_lbManageMemberList.SetColumnPosX( 3, 256 ,TEXT_CENTER);
  3560. m_lbManageMemberList.SetColumnPosX( 4, 402 ,TEXT_RIGHT);
  3561. m_lbManageMemberList.SetColumnPosX( 5, 515 ,TEXT_RIGHT);
  3562. #endif
  3563. // Up button
  3564. m_lbManageMemberList.SetScrollUpUV( UBS_IDLE, 230, 16, 239, 23, fTexWidth, fTexHeight );
  3565. m_lbManageMemberList.SetScrollUpUV( UBS_CLICK, 240, 16, 249, 23, fTexWidth, fTexHeight );
  3566. m_lbManageMemberList.CopyScrollUpUV( UBS_IDLE, UBS_ON );
  3567. m_lbManageMemberList.CopyScrollUpUV( UBS_IDLE, UBS_DISABLE );
  3568. // Down button
  3569. m_lbManageMemberList.SetScrollDownUV( UBS_IDLE, 230, 24, 239, 31, fTexWidth, fTexHeight );
  3570. m_lbManageMemberList.SetScrollDownUV( UBS_CLICK, 240, 24, 249, 31, fTexWidth, fTexHeight );
  3571. m_lbManageMemberList.CopyScrollDownUV( UBS_IDLE, UBS_ON );
  3572. m_lbManageMemberList.CopyScrollDownUV( UBS_IDLE, UBS_DISABLE );
  3573. // Bar button
  3574. m_lbManageMemberList.SetScrollBarTopUV( 219, 16, 228, 26, fTexWidth, fTexHeight );
  3575. m_lbManageMemberList.SetScrollBarMiddleUV( 219, 27, 228, 29, fTexWidth, fTexHeight );
  3576. m_lbManageMemberList.SetScrollBarBottomUV( 219, 30, 228, 40, fTexWidth, fTexHeight );
  3577.  
  3578. // Setting Popup Window
  3579. m_btnApplySetting.Create( this, _S(3846, "적용" ), 220, 218, 63, 21 );
  3580. m_btnApplySetting.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3581. m_btnApplySetting.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3582. m_btnApplySetting.CopyUV( UBS_IDLE, UBS_ON );
  3583. m_btnApplySetting.CopyUV( UBS_IDLE, UBS_DISABLE );
  3584.  
  3585. m_btnApplySettingClose.Create( this, _S(870, "닫기" ), 295, 218, 63, 21 );
  3586. m_btnApplySettingClose.SetUV( UBS_IDLE, 134, 117, 228, 138, fTexWidth, fTexHeight );
  3587. m_btnApplySettingClose.SetUV( UBS_CLICK, 134, 139, 228, 160, fTexWidth, fTexHeight );
  3588. m_btnApplySettingClose.CopyUV( UBS_IDLE, UBS_ON );
  3589. m_btnApplySettingClose.CopyUV( UBS_IDLE, UBS_DISABLE );
  3590.  
  3591. m_ebChangePositionName.Create( this, 220, 100, 140, 16, MAX_POSITION_NAME );
  3592. m_ebChangePositionName.SetReadingWindowUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3593. m_ebChangePositionName.SetCandidateUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3594.  
  3595. m_ebChangePayExp.Create( this, 220, 142, 140, 16, MAX_PERCENT_LENGTH );
  3596. m_ebChangePayExp.SetReadingWindowUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3597. m_ebChangePayExp.SetCandidateUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3598.  
  3599. m_ebChangePayFame.Create( this, 220, 184, 140, 16, MAX_PERCENT_LENGTH );
  3600. m_ebChangePayFame.SetReadingWindowUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3601. m_ebChangePayFame.SetCandidateUV( 146, 46, 163, 62, fTexWidth, fTexHeight );
  3602.  
  3603. int nStrWidth = ( strlen( _S(5562, "사용 가능" ) ) + 1 ) *
  3604. ( _pUIFontTexMgr->GetFontWidth() + _pUIFontTexMgr->GetFontSpacing() );
  3605. m_ckGuildStashPermission.Create( this, 230, 226, 11, 11, _S(5562, "사용 가능"), FALSE, nStrWidth, nStrWidth );
  3606. m_ckGuildStashPermission.SetUV( UCBS_NONE, UIRectUV( 12, 161, 23, 172, fTexWidth, fTexHeight ) );
  3607. m_ckGuildStashPermission.SetUV( UCBS_CHECK, UIRectUV( 0, 161, 11, 172, fTexWidth, fTexHeight ) );
  3608. m_ckGuildStashPermission.CopyUV( UCBS_NONE, UCBS_NONE_DISABLE );
  3609. m_ckGuildStashPermission.CopyUV( UCBS_NONE, UCBS_CHECK_DISABLE );
  3610. m_ckGuildStashPermission.SetTextColor( TRUE, 0xFFFFFFFF );
  3611. m_ckGuildStashPermission.SetTextColor( FALSE, 0xFFFFFFFF );
  3612. m_ckGuildStashPermission.SetCheck( FALSE );
  3613.  
  3614. m_pIconGuildMark = new CUIGuildMarkIcon();
  3615. m_pIconGuildMark->Create(this, 27, 250, BTN_SIZE, BTN_SIZE);
  3616. // -----------------------------------------------------------<<
  3617. }
  3618.  
  3619. // ----------------------------------------------------------------------------
  3620. // WSS_NEW_GUILD_SYSTEM 070703
  3621. // Name : RenderNewGuildManagePopup()
  3622. // Desc : 길드 설정 수정
  3623. // ----------------------------------------------------------------------------
  3624. void CUIGuild::RenderNewGuildManagePopup()
  3625. {
  3626. int nX = m_nPosX;
  3627. int nY = m_nPosY;
  3628.  
  3629. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  3630.  
  3631. // Render all elements
  3632. pDrawPort->FlushRenderingQueue();
  3633. // Flush all render text queue
  3634. pDrawPort->EndTextEx();
  3635.  
  3636. // Set skill learn texture
  3637. pDrawPort->InitTextureData( m_ptdBaseTexture );
  3638.  
  3639. m_bxBox1.SetBoxPos(WRect(0,0,NEW_GUILD_SYSTEM_WIDTH,NEW_GUILD_SYSTEM_HEIGHT));
  3640. m_bxBox1.Render(nX,nY);
  3641.  
  3642. #ifdef ENABLE_GUILD_STASH
  3643. m_bxBackGroundBox.SetBoxPos(WRect(203,55,377,77));
  3644. m_bxBackGroundBox.Render(nX,nY);
  3645. m_bxBackGroundBox2.SetBoxPos(WRect(203,77,377,340));
  3646. m_bxBackGroundBox2.Render(nX,nY);
  3647. m_bxBox1.SetBoxPos(WRect(218,143,361,165));
  3648. m_bxBox1.Render(nX,nY);
  3649. m_bxBox1.SetBoxPos(WRect(218,185,361,207));
  3650. m_bxBox1.Render(nX,nY);
  3651. m_bxBox1.SetBoxPos(WRect(218,227,361,249));
  3652. m_bxBox1.Render(nX,nY);
  3653. #else // ENABLE_GUILD_STASH
  3654. m_bxBackGroundBox.SetBoxPos(WRect(203,55,377,77));
  3655. m_bxBackGroundBox.Render(nX,nY);
  3656. m_bxBackGroundBox2.SetBoxPos(WRect(203,77,377,295));
  3657. m_bxBackGroundBox2.Render(nX,nY);
  3658. m_bxBox1.SetBoxPos(WRect(218,143,361,165));
  3659. m_bxBox1.Render(nX,nY);
  3660. m_bxBox1.SetBoxPos(WRect(218,185,361,207));
  3661. m_bxBox1.Render(nX,nY);
  3662. m_bxBox1.SetBoxPos(WRect(218,227,361,249));
  3663. m_bxBox1.Render(nX,nY);
  3664. #endif // ENABLE_GUILD_STASH
  3665. pDrawPort->PutTextEx( _S(3845, "설정 변경" ), nX + 220 , nY + 60);
  3666. pDrawPort->PutTextEx( _S(5365, "부대 설정" ), nX + 220 , nY + 81);
  3667. pDrawPort->PutTextEx( _S(3847, "직위명 설정" ), nX + 220 , nY + 126);
  3668. pDrawPort->PutTextEx( _S(3848, "경험치 상납설정" ), nX + 220 , nY + 168);
  3669. pDrawPort->PutTextEx( _S(3849, "명성치 상납설정" ), nX + 220 , nY + 210);
  3670. #ifdef ENABLE_GUILD_STASH
  3671. pDrawPort->PutTextEx( _S(5558, "길드 창고 사용 권한" ), nX + 220 , nY + 252);
  3672. #endif // ENABLE_GUILD_STASH
  3673. pDrawPort->PutTextEx( CTString( "%" ), nX + 345 , nY + 188);
  3674. pDrawPort->PutTextEx( CTString( "%" ), nX + 345 , nY + 230);
  3675.  
  3676. m_btnApplySetting.Render();
  3677. m_btnApplySettingClose.Render();
  3678.  
  3679. m_ebChangePositionName.Render();
  3680. m_ebChangePayExp.Render();
  3681. m_ebChangePayFame.Render();
  3682.  
  3683. #ifdef ENABLE_GUILD_STASH
  3684. m_ckGuildStashPermission.Render();
  3685. #endif // ENABLE_GUILD_STASH
  3686.  
  3687. pDrawPort->FlushRenderingQueue();
  3688. pDrawPort->EndTextEx();
  3689. // ITS#6919 : [FIXED] ui cracked in guild setting window [2/20/2012 rumist]
  3690. pDrawPort->InitTextureData( m_ptdBaseTexture );
  3691.  
  3692. m_cmbCorps.Render();
  3693. pDrawPort->FlushRenderingQueue();
  3694. pDrawPort->EndTextEx();
  3695. }
  3696.  
  3697. // ----------------------------------------------------------------------------
  3698. // WSS_NEW_GUILD_SYSTEM 070703
  3699. // Name : RenderNewGuildManage()
  3700. // Desc : 길드 시스템 개편 수정 인터페이스
  3701. // ----------------------------------------------------------------------------
  3702. void CUIGuild::RenderNewGuildManage(int nX,int nY)
  3703. {
  3704. if(_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS )
  3705. {
  3706. if(!m_btnChangeBossNew.IsEnabled())
  3707. {
  3708. m_btnChangeBossNew.SetEnable(TRUE); // 단장 이임
  3709. m_btnAcceptNew.SetEnable(TRUE); // 부단장 임명
  3710. m_btnRejectNew.SetEnable(TRUE); // 부단장 해임
  3711. m_btnMemberFireNew.SetEnable(TRUE); // 멤버 퇴출
  3712. m_btnChangeSetting.SetEnable(TRUE); // 설정 변경
  3713. }
  3714. }
  3715. else if (_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_VICE_BOSS)
  3716. {
  3717. if (m_btnChangeBossNew.IsEnabled())
  3718. {
  3719. m_btnChangeBossNew.SetEnable(FALSE); // 단장 이임
  3720. m_btnAcceptNew.SetEnable(FALSE); // 부단장 임명
  3721. m_btnRejectNew.SetEnable(FALSE); // 부단장 해임
  3722. m_btnMemberFireNew.SetEnable(TRUE); // 멤버 퇴출
  3723. m_btnChangeSetting.SetEnable(FALSE); // 설정 변경
  3724. }
  3725. }
  3726. else
  3727. {
  3728. if(m_btnChangeBossNew.IsEnabled())
  3729. {
  3730. m_btnChangeBossNew.SetEnable(FALSE); // 단장 이임
  3731. m_btnAcceptNew.SetEnable(FALSE); // 부단장 임명
  3732. m_btnRejectNew.SetEnable(FALSE); // 부단장 해임
  3733. m_btnMemberFireNew.SetEnable(FALSE); // 멤버 퇴출
  3734. m_btnChangeSetting.SetEnable(FALSE); // 설정 변경
  3735. }
  3736. }
  3737.  
  3738. // Button
  3739. m_btnChangeBossNew.Render(); // 단장 이임
  3740. m_btnAcceptNew.Render(); // 부단장 임명
  3741. m_btnRejectNew.Render(); // 부단장 해임
  3742. m_btnMemberFireNew.Render(); // 멤버 퇴출
  3743. m_btnChangeSetting.Render(); // 설정 변경
  3744.  
  3745. // Box
  3746. m_bxBox2.SetBoxPos(WRect(nX+20,nY+56,nX+583,nY+239));
  3747. m_bxBox2.Render();
  3748.  
  3749. // List
  3750. m_lbManageMemberList.Render(); // Guild Member List
  3751.  
  3752. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  3753.  
  3754. // Line
  3755. pDrawPort->AddTexture(nX+21,nY+74,nX+582,nY+75,
  3756. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  3757.  
  3758. pDrawPort->AddTexture(nX+98,nY+74,nX+99,nY+239,
  3759. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3760. pDrawPort->AddTexture(nX+186,nY+74,nX+187,nY+239,
  3761. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3762. pDrawPort->AddTexture(nX+231,nY+74,nX+232,nY+239,
  3763. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3764. #ifdef ENABLE_GUILD_STASH
  3765. pDrawPort->AddTexture(nX+346,nY+74,nX+347,nY+239,
  3766. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3767. pDrawPort->AddTexture(nX+425,nY+74,nX+426,nY+239,
  3768. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3769. pDrawPort->AddTexture(nX+507,nY+74,nX+508,nY+239,
  3770. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3771. #else
  3772. pDrawPort->AddTexture(nX+341,nY+74,nX+342,nY+239,
  3773. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3774. pDrawPort->AddTexture(nX+457,nY+74,nX+458,nY+239,
  3775. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  3776. #endif
  3777.  
  3778. // Text
  3779. pDrawPort->PutTextExCX( _S(3850, "서열" ), nX + 58 , nY +60);
  3780. pDrawPort->PutTextExCX( _S(3847, "직위명 설정" ), nX +143, nY +60);
  3781. pDrawPort->PutTextExCX( _S(3851, "Lv." ), nX +210, nY +60);
  3782. pDrawPort->PutTextExCX( _S(3105, "캐릭터명" ), nX +286 , nY +60);
  3783. #ifdef ENABLE_GUILD_STASH
  3784. pDrawPort->PutTextExCX( _S(3848, "경험치 상납" ), nX +385, nY +60);
  3785. pDrawPort->PutTextExCX( _S(3849, "명성치 상납" ), nX +467, nY +60);
  3786. pDrawPort->PutTextExCX( _S(5559, "창고 사용" ), nX +542, nY +60);
  3787. #else
  3788. pDrawPort->PutTextExCX( _S(3848, "경험치 상납" ), nX +400, nY +60);
  3789. pDrawPort->PutTextExCX( _S(3849, "명성치 상납" ), nX +519, nY +60);
  3790. #endif
  3791.  
  3792. if(m_bApplySettingOn)
  3793. RenderNewGuildManagePopup();
  3794. }
  3795.  
  3796. // ----------------------------------------------------------------------------
  3797. // WSS_NEW_GUILD_SYSTEM 070702
  3798. // Name : RenderNewGuildNoticeInput()
  3799. // Desc : 길드 시스템 개편 수정 인터페이스
  3800. // ----------------------------------------------------------------------------
  3801. void CUIGuild::RenderNewGuildNoticeInput()
  3802. {
  3803. // Add render regions
  3804. int nX, nY;
  3805.  
  3806. nX = m_nPosX;
  3807. nY = m_nPosY;
  3808.  
  3809. if(_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS)
  3810. {
  3811. if(!m_btnNotice.IsEnabled())
  3812. {
  3813. m_btnNotice.SetEnable(TRUE);
  3814. m_btnNoticeCorrect.SetEnable(TRUE);
  3815. m_btnUpdateNotice.SetEnable(TRUE);
  3816. }
  3817. if (m_bEnableCorrect)
  3818. {
  3819. if( !m_ebNoticeTitle.IsEnabled() )
  3820. {
  3821. m_ebNoticeTitle.SetEnable(TRUE);
  3822. m_mebNoticeContent.SetEnable(TRUE);
  3823. }
  3824. }
  3825. else
  3826. {
  3827. if( m_ebNoticeTitle.IsEnabled() )
  3828. {
  3829. m_ebNoticeTitle.SetEnable(FALSE);
  3830. m_mebNoticeContent.SetEnable(FALSE);
  3831. }
  3832. }
  3833. }
  3834. else
  3835. {
  3836. if(m_btnNotice.IsEnabled())
  3837. {
  3838. m_btnNotice.SetEnable(FALSE);
  3839. m_btnNoticeCorrect.SetEnable(FALSE);
  3840. m_btnUpdateNotice.SetEnable(FALSE);
  3841. m_ebNoticeTitle.SetEnable(FALSE);
  3842. m_mebNoticeContent.SetEnable(FALSE);
  3843. }
  3844. }
  3845. m_btnNotice.Render(); // 공지 버튼
  3846. m_btnNoticeCorrect.Render(); // 수정 버튼
  3847. m_btnUpdateNotice.Render(); // 작성완료 버튼
  3848.  
  3849. m_bxBox2.SetBoxPos(WRect(80,72,553,100));
  3850. m_bxBox2.Render(nX,nY);
  3851. m_bxBox2.SetBoxPos(WRect(80,111,553,249));
  3852. m_bxBox2.Render(nX,nY);
  3853.  
  3854. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  3855.  
  3856. // Render all elements
  3857. pDrawPort->FlushRenderingQueue();
  3858. // Flush all render text queue
  3859. pDrawPort->EndTextEx();
  3860.  
  3861.  
  3862. m_ebNoticeTitle.Render(); // 제목
  3863. m_mebNoticeContent.Render(); // 내용
  3864.  
  3865. pDrawPort->PutTextExCX( _S(341, "제목" ), nX + 43 , nY + 78);
  3866. pDrawPort->PutTextExCX( _S(3852, "내용" ), nX + 43 , nY + 171);
  3867. }
  3868.  
  3869. // ----------------------------------------------------------------------------
  3870. // WSS_NEW_GUILD_SYSTEM 070719
  3871. // Name : RenderNewGuildBoardWrite()
  3872. // Desc : 길드 시스템 개편 수정 인터페이스
  3873. // ----------------------------------------------------------------------------
  3874. void CUIGuild::RenderNewGuildBoardWrite()
  3875. {
  3876. // Rener Box
  3877. m_bxBox3.SetBoxPos(WRect(25,54,98,71));
  3878. m_bxBox3.Render(m_nPosX,m_nPosY);
  3879. m_bxBox3.SetBoxPos(WRect(25,78,98,96));
  3880. m_bxBox3.Render(m_nPosX,m_nPosY);
  3881. m_bxBox3.SetBoxPos(WRect(25,115,98,245));
  3882. m_bxBox3.Render(m_nPosX,m_nPosY);
  3883.  
  3884. m_bxBox1.SetBoxPos(WRect(109,54,557,71));
  3885. m_bxBox1.Render(m_nPosX,m_nPosY);
  3886. m_bxBox1.SetBoxPos(WRect(109,78,557,96));
  3887. m_bxBox1.Render(m_nPosX,m_nPosY);
  3888. m_bxBox1.SetBoxPos(WRect(109,115,557,245));
  3889. m_bxBox1.Render(m_nPosX,m_nPosY);
  3890.  
  3891. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  3892.  
  3893. // Text in write type
  3894. pDrawPort->PutTextEx ( _pNetwork->MyCharacterInfo.name, m_nPosX + 112,
  3895. m_nPosY + 55, 0xFFFFCAFF );
  3896.  
  3897. pDrawPort->PutTextEx( _S( 244, "작성자" ), m_nPosX+43,
  3898. m_nPosY + 57, 0xFFFFCAFF );
  3899. pDrawPort->PutTextEx( _S( 195, "제 목" ), m_nPosX+43,
  3900. m_nPosY + 81, 0xFFFFCAFF );
  3901. pDrawPort->PutTextEx( _S( 418, "내 용" ), m_nPosX+43,
  3902. m_nPosY + 120, 0xFFFFCAFF );
  3903.  
  3904. // Render all elements
  3905. pDrawPort->FlushRenderingQueue();
  3906.  
  3907. m_mebContent.Render ();
  3908.  
  3909. // Set web board texture
  3910. pDrawPort->InitTextureData( m_ptdBaseTexture );
  3911.  
  3912. // List button
  3913. m_btnList.Render();
  3914.  
  3915. // Subject edit box
  3916. m_ebWriteSubject.Render();
  3917.  
  3918. if( pWEB->m_nCurBoardType == UWT_MODIFY )
  3919. {
  3920. // Modify button
  3921. m_btnModify.Render();
  3922. }
  3923. else
  3924. {
  3925. // Write button
  3926. m_btnWrite.Render();
  3927. }
  3928.  
  3929. if ( m_ebWriteSubject.DoesShowReadingWindow () )
  3930. {
  3931. // Set web board texture
  3932. pDrawPort->InitTextureData( m_ptdBaseTexture );
  3933.  
  3934. // Reading window
  3935. m_ebWriteSubject.RenderReadingWindow();
  3936.  
  3937. // Render all elements
  3938. pDrawPort->FlushRenderingQueue();
  3939.  
  3940. // Flush all render text queue
  3941. pDrawPort->EndTextEx();
  3942. }
  3943. }
  3944.  
  3945. // ----------------------------------------------------------------------------
  3946. // WSS_NEW_GUILD_SYSTEM 070719
  3947. // Name : RenderNewGuildBoardRead()
  3948. // Desc : 길드 시스템 개편 수정 인터페이스
  3949. // ----------------------------------------------------------------------------
  3950. void CUIGuild::RenderNewGuildBoardRead()
  3951. {
  3952. // Rener Box
  3953. m_bxBox3.SetBoxPos(WRect(22,52,554,73));
  3954. m_bxBox3.Render(m_nPosX,m_nPosY);
  3955.  
  3956. m_bxBox1.SetBoxPos(WRect(21,90,557,247));
  3957. m_bxBox1.Render(m_nPosX,m_nPosY);
  3958.  
  3959. // Render Buttons
  3960. m_btnList.Render();
  3961. m_btnReply.Render();
  3962. m_btnDelete.Render();
  3963. m_btnModify.Render();
  3964.  
  3965. // List box
  3966. GetBoardReadContent();
  3967. m_lbReadContent.Render();
  3968.  
  3969. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  3970.  
  3971. // Text in read type
  3972. pDrawPort->PutTextEx( pWEB->m_strReadNo, m_nPosX + 35,
  3973. m_nPosY + 55, 0xFFFFCAFF );
  3974. pDrawPort->PutTextEx( pWEB->m_strReadSubject, m_nPosX + 102,
  3975. m_nPosY + 55, 0xFFFFCAFF );
  3976. pDrawPort->PutTextExRX( pWEB->m_strReadName, m_nPosX + 546,
  3977. m_nPosY + 55, 0xFFFFCAFF );
  3978.  
  3979. pDrawPort->PutTextEx( pWEB->m_strReadDate, m_nPosX + 401,
  3980. m_nPosY + 93, 0xFFFFCAFF );
  3981. pDrawPort->PutTextExRX( pWEB->m_strReadHit, m_nPosX + 548,
  3982. m_nPosY + 93, 0xFFFFCAFF );
  3983. }
  3984.  
  3985.  
  3986. // ----------------------------------------------------------------------------
  3987. // WSS_NEW_GUILD_SYSTEM 070719
  3988. // Name : RenderNewGuildBoardList()
  3989. // Desc : 길드 시스템 개편 수정 인터페이스
  3990. // ----------------------------------------------------------------------------
  3991. void CUIGuild::RenderNewGuildBoardList()
  3992. {
  3993. m_bxBox3.SetBoxPos(WRect(22,52,554,73));
  3994. m_bxBox3.Render(m_nPosX,m_nPosY);
  3995.  
  3996. // Page buttons
  3997. for( int iPage = 0; iPage < pWEB->m_nValidPageBtnCount; iPage++ )
  3998. {
  3999. m_btnPage[iPage].SetText(pWEB->m_btnPage[iPage].GetText());
  4000. m_btnPage[iPage].SetPos(pWEB->m_btnPage[iPage].GetPosX(),251);
  4001. m_btnPage[iPage].Render();
  4002. }
  4003.  
  4004. // Prev button
  4005. if( pWEB->m_nCurrentFirstPage > 1 )
  4006. {
  4007. m_btnPrev.SetPos(pWEB->m_btnPrev.GetPosX(),253);
  4008. m_btnPrev.Render();
  4009. }
  4010.  
  4011. // Next button
  4012. if( pWEB->m_nCurrentLastPage < pWEB->m_nTotalPage )
  4013. {
  4014. m_btnNext.SetPos(pWEB->m_btnNext.GetPosX(),253);
  4015. m_btnNext.Render();
  4016. }
  4017.  
  4018. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  4019.  
  4020. // Text in list type
  4021. pDrawPort->PutTextEx( CTString( "No" ), m_nPosX + 38,m_nPosY + 57, 0xFFFFCAFF );
  4022. pDrawPort->PutTextEx( _S( 341, "제목" ), m_nPosX + 184,m_nPosY + 57, 0xFFFFCAFF );
  4023. pDrawPort->PutTextEx( _S( 244, "작성자" ), m_nPosX + 341,m_nPosY + 57, 0xFFFFCAFF );
  4024. pDrawPort->PutTextEx( _S( 398, "작성일" ), m_nPosX + 420,m_nPosY + 57, 0xFFFFCAFF );
  4025. pDrawPort->PutTextEx( _S( 399, "조회" ), m_nPosX + 504,m_nPosY + 57, 0xFFFFCAFF );
  4026.  
  4027. // List box
  4028. GetBoardListContent();
  4029. m_lbListContent.Render();
  4030.  
  4031. // Search button
  4032. m_btnSearch.Render();
  4033.  
  4034. // Search combobox
  4035. m_cmbSearch.Render();
  4036.  
  4037. // Search edit box
  4038. m_ebSearch.Render();
  4039. m_bxBox4.SetBoxPos(WRect(233,271,378,287));
  4040. m_bxBox4.Render(m_nPosX,m_nPosY);
  4041.  
  4042. // Write button
  4043. m_btnWrite.Render();
  4044. }
  4045.  
  4046. // ----------------------------------------------------------------------------
  4047. // WSS_NEW_GUILD_SYSTEM 070719
  4048. // Name : RenderNewGuildBoard()
  4049. // Desc : 길드 시스템 개편 수정 인터페이스
  4050. // ----------------------------------------------------------------------------
  4051. void CUIGuild::RenderNewGuildBoard(int nx,int ny)
  4052. {
  4053. if(!pWEB->DelayCommandExecute()) return;
  4054. switch (pWEB->m_nCurBoardType)
  4055. {
  4056.  
  4057. case UWT_LIST:
  4058. RenderNewGuildBoardList();
  4059. break;
  4060. case UWT_READ:
  4061. RenderNewGuildBoardRead();
  4062. break;
  4063. case UWT_WRITE:
  4064. case UWT_MODIFY:
  4065. case UWT_REPLY:
  4066. RenderNewGuildBoardWrite();
  4067. break;
  4068.  
  4069. }
  4070.  
  4071. }
  4072.  
  4073. // ----------------------------------------------------------------------------
  4074. // WSS_NEW_GUILD_SYSTEM 070608
  4075. // Name : RenderNewGuildMemberInfo()
  4076. // Desc : 길드 시스템 개편 수정 인터페이스
  4077. // ----------------------------------------------------------------------------
  4078. void CUIGuild::RenderNewGuildMemberInfo(int nX,int nY)
  4079. {
  4080. // Box
  4081. m_bxBox2.SetBoxPos(WRect(nX+20,nY+56,nX+583,nY+239));
  4082. m_bxBox2.Render();
  4083.  
  4084. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  4085.  
  4086. // Line
  4087. pDrawPort->AddTexture(nX+21,nY+74,nX+582,nY+75,
  4088. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  4089.  
  4090. pDrawPort->AddTexture(nX+47,nY+74,nX+48,nY+239,
  4091. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4092. pDrawPort->AddTexture(nX+146,nY+74,nX+147,nY+239,
  4093. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4094. pDrawPort->AddTexture(nX+221,nY+74,nX+222,nY+239,
  4095. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4096. pDrawPort->AddTexture(nX+261,nY+74,nX+262,nY+239,
  4097. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4098. pDrawPort->AddTexture(nX+343,nY+74,nX+344,nY+239,
  4099. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4100. pDrawPort->AddTexture(nX+429,nY+74,nX+430,nY+239,
  4101. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4102. pDrawPort->AddTexture(nX+476,nY+74,nX+477,nY+239,
  4103. m_uvLineV.U0,m_uvLineV.V0,m_uvLineV.U1,m_uvLineV.V1,0xFFFFFFFF);
  4104.  
  4105. // Text
  4106. // pDrawPort->PutTextExCX( _S(3105, "캐릭터명" ), nX + 92 , nY +60);
  4107. // pDrawPort->PutTextExCX( _S(3856, "직위명" ), nX +184, nY +60);
  4108. // pDrawPort->PutTextExCX( _S(3851, "Lv." ), nX +240, nY +60);
  4109. // pDrawPort->PutTextExCX( _S(72, "클래스" ), nX +300 , nY +60);
  4110. // pDrawPort->PutTextExCX( _S(3857, "접속위치" ), nX +386, nY +60);
  4111. // pDrawPort->PutTextExCX( _S(3858, "기여도" ), nX +453, nY +60);
  4112. // pDrawPort->PutTextExCX( _S(3859, "누적 포인트" ), nX +529, nY+60);
  4113.  
  4114. // pDrawPort->PutTextEx( _S(921, "길드원 관리" ), nX +21, nY+245);
  4115. pDrawPort->PutTextExRX( _S(3860, "접속한 길드원" ), nX +581, nY+245);
  4116. CTString tStr;
  4117. tStr.PrintF("%d/%d",m_iOnlineMembers,m_iNumOfMember);
  4118. pDrawPort->PutTextExRX( tStr.str_String,nX+581,nY+259);
  4119. // 일반직위 인원수
  4120. pDrawPort->PutTextExRX( _S( 5329, "일반직위 인원수" ), nX +430, nY+245);
  4121. tStr.PrintF("%d/%d",m_iCorpsMember, nMaxCorpsMember);
  4122. pDrawPort->PutTextExRX( tStr.str_String,nX+430,nY+259);
  4123. // 대장직위 인원수
  4124. pDrawPort->PutTextExRX( _S( 5330, "대장직위 인원수" ), nX +262, nY+245);
  4125. tStr.PrintF("%d/%d",m_iCorpsBoss, nMaxCorpsBoss);
  4126. pDrawPort->PutTextExRX( tStr.str_String,nX+262,nY+259);
  4127. // List
  4128. m_lbGuildMemberList.Render(); // Guild Member List
  4129.  
  4130. int i;
  4131. for (i = 0; i < eGML_MAX; ++i)
  4132. {
  4133. m_pCbMemberArrange[i]->OnRender(pDrawPort);
  4134. }
  4135. }
  4136. // ----------------------------------------------------------------------------
  4137. // WSS_NEW_GUILD_SYSTEM 070608
  4138. // Name : RenderNew()
  4139. // Desc : 길드 시스템 개편 수정 인터페이스
  4140. // ----------------------------------------------------------------------------
  4141. void CUIGuild::RenderNewGuildInfo(int nX,int nY)
  4142. {
  4143. // Left Top
  4144. m_bxBox2.SetBoxPos(WRect(nX+21,nY+54,nX+282,nY+218));
  4145. m_bxBox2.Render();
  4146.  
  4147. // Left Bottom
  4148. m_bxBox2.SetBoxPos(WRect(nX+21,nY+224,nX+282,nY+286));
  4149. m_bxBox2.Render();
  4150.  
  4151. // Right Top
  4152. m_bxBox2.SetBoxPos(WRect(nX+287,nY+54,nX+582,nY+121));
  4153. m_bxBox2.Render();
  4154.  
  4155. // Right Bottom1
  4156. m_bxBox2.SetBoxPos(WRect(nX+287,nY+128,nX+432,nY+285));
  4157. m_bxBox2.Render();
  4158.  
  4159. // Right Bottom2
  4160. m_bxBox2.SetBoxPos(WRect(nX+437,nY+128,nX+582,nY+285));
  4161. m_bxBox2.Render();
  4162.  
  4163. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  4164.  
  4165. // Horizon Line
  4166. pDrawPort->AddTexture(nX+22,nY+244,nX+281,nY+245,
  4167. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  4168. pDrawPort->AddTexture(nX+288,nY+75,nX+581,nY+76,
  4169. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  4170. pDrawPort->AddTexture(nX+288,nY+149,nX+431,nY+150,
  4171. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  4172. pDrawPort->AddTexture(nX+438,nY+149,nX+581,nY+150,
  4173. m_uvLineH.U0,m_uvLineH.V0,m_uvLineH.U1,m_uvLineH.V1,0xFFFFFFFF);
  4174.  
  4175. // Render List
  4176. m_lbMemberAllianceList.Render();
  4177. m_lbMemberHostilityList.Render();
  4178.  
  4179. // Buttons
  4180. m_btnEdit.Render();
  4181.  
  4182. // Guild Mark
  4183. m_bxBox1.SetBoxPos(WRect(nX+26,nY+249,nX+59,nY+282));
  4184. m_bxBox1.Render();
  4185.  
  4186. // m_btnGuildMarkBack.Render();
  4187.  
  4188. if (m_guildMarkTime >= 0)
  4189. pDrawPort->FlushRenderingQueue();
  4190.  
  4191. #ifdef GUILD_MARK
  4192. m_pIconGuildMark->Render(pDrawPort);
  4193. #endif // GUILD_MARK
  4194.  
  4195. // Text
  4196. int nX2 = m_nPosX + 30;
  4197. int nY2 = m_nPosY + 50;
  4198. int nSpace = _pUIFontTexMgr->GetFontHeight() + 10;
  4199. int nInc = nSpace;
  4200. CTString tStr;
  4201.  
  4202. pDrawPort->PutTextEx( _S(3451, "길드명" ), nX2 , nY2 + nSpace);
  4203. pDrawPort->PutTextEx( m_strGuildName, nX2 + 135 , nY2 + nSpace);
  4204.  
  4205. pDrawPort->PutTextEx( _S(3861, "길드 레벨" ), nX2 , nY2 + (nSpace+=nInc));
  4206. tStr.PrintF("%d",m_iGuildLevel);
  4207. pDrawPort->PutTextEx( tStr, nX2 + 135 , nY2 + nSpace);
  4208.  
  4209. pDrawPort->PutTextEx( _S(891, "길드장" ), nX2 , nY2 + (nSpace+=nInc));
  4210. pDrawPort->PutTextEx( m_strBossName, nX2 + 135 , nY2 + nSpace);
  4211.  
  4212. pDrawPort->PutTextEx( _S(3862, "길드원 인원" ),nX2 , nY2 + (nSpace+=nInc));
  4213. tStr.PrintF("%d/%d",m_iNumOfMember,m_iNumOfMaxMember);
  4214. pDrawPort->PutTextEx( tStr, nX2 + 135 , nY2 + nSpace);
  4215.  
  4216. pDrawPort->PutTextEx( _S(3863, "길드 평균 레벨" ),nX2 , nY2 + (nSpace+=nInc));
  4217. tStr.PrintF("%d",m_iGuildAverageLevel);
  4218. pDrawPort->PutTextEx( tStr, nX2 + 135 , nY2 + nSpace);
  4219.  
  4220. pDrawPort->PutTextEx( _S(3864, "소유 영지" ),nX2 , nY2 + (nSpace+=nInc));
  4221. if(m_iGuildOwnLand>0)
  4222. tStr.PrintF("%d",m_iGuildOwnLand);
  4223. else
  4224. tStr=_S(3865, "없음");
  4225. pDrawPort->PutTextEx( tStr, nX2 + 135 , nY2 + nSpace);
  4226.  
  4227. pDrawPort->PutTextEx( _S(3866, "길드 마크" ),nX +28 , nY + 228);
  4228. // [sora] GUILD_MARK
  4229. #ifdef GUILD_MARK
  4230. tStr = m_strGuildMarkTime;
  4231. #else
  4232. tStr = _S(3867, "[사용기간 : 1년]" );
  4233. #endif
  4234. pDrawPort->PutTextExCX( tStr, nX + 137 , nY + 259);
  4235. pDrawPort->PutTextEx( _S(3977, "길드 포인트(GP)" ),nX +294 , nY + 58);
  4236.  
  4237. pDrawPort->PutTextEx( _S(3868, "총 포인트" ),nX +304 , nY + 81);
  4238. tStr.PrintF("%d",m_iGuildTotalPoint);
  4239. pDrawPort->PutTextEx( tStr, nX + 500 , nY + 81);
  4240. pDrawPort->PutTextEx( _S(3869, "기여 포인트" ),nX +304 , nY + 100);
  4241. tStr.PrintF("%d",m_iGuildMyPoint);
  4242. pDrawPort->PutTextEx( tStr, nX + 500 , nY + 100);
  4243.  
  4244. pDrawPort->PutTextEx( _S(3870, "동맹 군단" ),nX +294 , nY + 132, COLOR(0x064729FF));
  4245. pDrawPort->PutTextEx( _S(3871, "적대 군단" ),nX +446 , nY + 132, COLOR(0x531D2AFF));
  4246. }
  4247.  
  4248. // ----------------------------------------------------------------------------
  4249. // WSS_NEW_GUILD_SYSTEM 070608
  4250. // Name : RenderNew()
  4251. // Desc : 길드 시스템 개편 수정 인터페이스
  4252. // ----------------------------------------------------------------------------
  4253. void CUIGuild::RenderNew()
  4254. {
  4255. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  4256.  
  4257. // Set skill learn texture
  4258. pDrawPort->InitTextureData( m_ptdBaseTexture );
  4259.  
  4260. // Add render regions
  4261. int nX, nY;
  4262.  
  4263. nX = m_nPosX;
  4264. nY = m_nPosY;
  4265.  
  4266. // Background
  4267. m_bxBackGroundBox.SetBoxPos(WRect(nX,nY,nX+NEW_GUILD_SYSTEM_WIDTH,nY+22));
  4268. m_bxBackGroundBox.Render();
  4269. m_bxBackGroundBox2.SetBoxPos(WRect(nX,nY+22,nX+NEW_GUILD_SYSTEM_WIDTH,nY+NEW_GUILD_SYSTEM_HEIGHT));
  4270. m_bxBackGroundBox2.Render();
  4271. // Tab
  4272.  
  4273. for(int i=0;i<MAX_GUILDINFO_TAB;i++)
  4274. {
  4275. if( m_iSelTab != i)
  4276. {
  4277. m_bxBox2.SetBoxPos(WRect(nX+m_rcTabNew[i].Left,nY+m_rcTabNew[i].Top,
  4278. nX+m_rcTabNew[i].Right,nY+m_rcTabNew[i].Bottom));
  4279. m_bxBox2.Render();
  4280. }
  4281. }
  4282. int tCabL=5 ,tCabR=5;
  4283. if(m_iSelTab==0) tCabL = 0; else tCabL =5;
  4284. if(m_iSelTab==(MAX_GUILDINFO_TAB-1)) tCabR = 0; else tCabR =5;
  4285. m_bxBox1_1.SetBoxPos(WRect(nX+m_rcTabNew[m_iSelTab].Left-tCabL,nY+m_rcTabNew[m_iSelTab].Top-3,
  4286. nX+m_rcTabNew[m_iSelTab].Right+tCabR,nY+m_rcTabNew[m_iSelTab].Bottom));
  4287. m_bxBox1_1.Render();
  4288.  
  4289. m_bxBox1_2.SetBoxPos(WRect(nX+9,nY+47,nX+595,nY+295));
  4290. m_bxBox1_2.Render();
  4291.  
  4292. // Buttons
  4293. m_btnExitNew.Render();
  4294. m_btnCloseNew.Render();
  4295.  
  4296. // Render Guild Info
  4297. switch(m_iSelTab)
  4298. {
  4299. case NEW_GUILD_INFO:
  4300. RenderNewGuildInfo(nX,nY);
  4301. break;
  4302. case NEW_GUILD_MEMBER_INFO:
  4303. RenderNewGuildMemberInfo(nX,nY);
  4304. break;
  4305. case NEW_GUILD_SKILL:
  4306. RenderNewGuildSkillExtend(nX, nY);
  4307. break;
  4308. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  4309. case NEW_GUILD_BOARD:
  4310. RenderNewGuildBoard(nX,nY);
  4311. break;
  4312. #endif
  4313. case NEW_GUILD_NOTICE:
  4314. RenderNewGuildNoticeInput();
  4315. break;
  4316. case NEW_GUILD_MANAGE:
  4317. RenderNewGuildManage(nX,nY);
  4318. break;
  4319. }
  4320.  
  4321. // Text
  4322. pDrawPort->PutTextEx( m_strGuildName, m_nPosX + 19, m_nPosY + 6);
  4323. pDrawPort->PutTextExCX( _S(3872, "길드 정보" ),
  4324. m_nPosX + m_rcTabNew[NEW_GUILD_INFO].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_INFO].Top+3);
  4325. pDrawPort->PutTextExCX( _S(3873, "길드원 정보" ),
  4326. m_nPosX + m_rcTabNew[NEW_GUILD_MEMBER_INFO].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_MEMBER_INFO].Top+3);
  4327. pDrawPort->PutTextExCX( _S(3874, "길드 스킬" ),
  4328. m_nPosX + m_rcTabNew[NEW_GUILD_SKILL].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_SKILL].Top+3);
  4329. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  4330. pDrawPort->PutTextExCX( _S( 3875, "길드 게시판" ),
  4331. m_nPosX + m_rcTabNew[NEW_GUILD_BOARD].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_BOARD].Top+3);
  4332. #endif
  4333. pDrawPort->PutTextExCX( _S(3876, "길드 공지사항" ),
  4334. m_nPosX + m_rcTabNew[NEW_GUILD_NOTICE].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_NOTICE].Top+3);
  4335. pDrawPort->PutTextExCX( _S(918, "길드 관리" ),
  4336. m_nPosX + m_rcTabNew[NEW_GUILD_MANAGE].Left + m_rcTabNew[0].GetWidth()/2, m_nPosY + m_rcTabNew[NEW_GUILD_MANAGE].Top+3);
  4337.  
  4338. // Render all elements
  4339. pDrawPort->FlushRenderingQueue();
  4340. // Flush all render text queue
  4341. pDrawPort->EndTextEx();
  4342. }
  4343.  
  4344.  
  4345.  
  4346. // ----------------------------------------------------------------------------
  4347. // Name : MouseMessage()
  4348. // Desc :
  4349. // ----------------------------------------------------------------------------
  4350. WMSG_RESULT CUIGuild::MouseMessageNewBoard( MSG *pMsg )
  4351. {
  4352. WMSG_RESULT wmsgResult;
  4353.  
  4354. // Mouse message
  4355. switch( pMsg->message )
  4356. {
  4357. case WM_MOUSEMOVE:
  4358. {
  4359. // Guild Web Board
  4360.  
  4361. // List
  4362. if( pWEB->m_nCurBoardType == UWT_LIST )
  4363. {
  4364. // Search combobox
  4365. if( m_cmbSearch.MouseMessage( pMsg ) != WMSG_FAIL )
  4366. return WMSG_SUCCESS;
  4367. // Search button
  4368. else if( m_btnSearch.MouseMessage( pMsg ) != WMSG_FAIL )
  4369. return WMSG_SUCCESS;
  4370. // Write button
  4371. else if( m_btnWrite.MouseMessage( pMsg ) != WMSG_FAIL )
  4372. return WMSG_SUCCESS;
  4373. // List box
  4374. else if( m_lbListContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4375. return WMSG_SUCCESS;
  4376. // Prev button
  4377. else if( m_btnPrev.MouseMessage( pMsg ) != WMSG_FAIL )
  4378. return WMSG_SUCCESS;
  4379. // Next button
  4380. else if( m_btnNext.MouseMessage( pMsg ) != WMSG_FAIL )
  4381. return WMSG_SUCCESS;
  4382. // Page buttons
  4383. else
  4384. {
  4385. for( int iPage = 0; iPage < pWEB->m_nValidPageBtnCount; iPage++ )
  4386. {
  4387. if( m_btnPage[iPage].MouseMessage( pMsg ) != WMSG_FAIL )
  4388. return WMSG_SUCCESS;
  4389. }
  4390. }
  4391. }
  4392. // Read
  4393. else if( pWEB->m_nCurBoardType == UWT_READ )
  4394. {
  4395. // List button
  4396. if( m_btnList.MouseMessage( pMsg ) != WMSG_FAIL )
  4397. return WMSG_SUCCESS;
  4398. // Reply button
  4399. else if( m_btnReply.MouseMessage( pMsg ) != WMSG_FAIL )
  4400. return WMSG_SUCCESS;
  4401. // Modify button
  4402. else if( m_btnModify.MouseMessage( pMsg ) != WMSG_FAIL )
  4403. return WMSG_SUCCESS;
  4404. // Delete button
  4405. else if( m_btnDelete.MouseMessage( pMsg ) != WMSG_FAIL )
  4406. return WMSG_SUCCESS;
  4407. // List box of read type
  4408. else if( m_lbReadContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4409. return WMSG_SUCCESS;
  4410. }
  4411. // Write
  4412. else if( pWEB->m_nCurBoardType == UWT_WRITE )
  4413. {
  4414. // List button
  4415. if( m_btnList.MouseMessage( pMsg ) != WMSG_FAIL )
  4416. return WMSG_SUCCESS;
  4417. // Write button
  4418. else if( m_btnWrite.MouseMessage( pMsg ) != WMSG_FAIL )
  4419. return WMSG_SUCCESS;
  4420. else if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4421. return WMSG_SUCCESS;
  4422. else if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4423. return WMSG_SUCCESS;
  4424. }
  4425. // Reply
  4426. else if( pWEB->m_nCurBoardType == UWT_REPLY )
  4427. {
  4428. // List button
  4429. if( m_btnList.MouseMessage( pMsg ) != WMSG_FAIL )
  4430. return WMSG_SUCCESS;
  4431. // Write button
  4432. else if( m_btnWrite.MouseMessage( pMsg ) != WMSG_FAIL )
  4433. return WMSG_SUCCESS;
  4434. else if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4435. return WMSG_SUCCESS;
  4436. else if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4437. return WMSG_SUCCESS;
  4438. }
  4439. // Modify
  4440. else if( pWEB->m_nCurBoardType == UWT_MODIFY )
  4441. {
  4442. // List button
  4443. if( m_btnList.MouseMessage( pMsg ) != WMSG_FAIL )
  4444. return WMSG_SUCCESS;
  4445. // Modify button
  4446. else if( m_btnModify.MouseMessage( pMsg ) != WMSG_FAIL )
  4447. return WMSG_SUCCESS;
  4448. else if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4449. return WMSG_SUCCESS;
  4450. else if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4451. return WMSG_SUCCESS;
  4452. }
  4453.  
  4454. }
  4455. break;
  4456. case WM_LBUTTONDOWN:
  4457. {
  4458. // List
  4459. if( pWEB->m_nCurBoardType == UWT_LIST )
  4460. {
  4461. // Search combobox
  4462. m_cmbSearch.MouseMessage( pMsg );
  4463. // Search edit box
  4464. m_ebSearch.MouseMessage( pMsg );
  4465. // Search button
  4466. m_btnSearch.MouseMessage( pMsg );
  4467. // Write button
  4468. m_btnWrite.MouseMessage( pMsg );
  4469. // Prev button
  4470. m_btnPrev.MouseMessage( pMsg );
  4471. // Next button
  4472. m_btnNext.MouseMessage( pMsg );
  4473. // List box
  4474. if( ( wmsgResult = m_lbListContent.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4475. {
  4476. if( wmsgResult == WMSG_COMMAND )
  4477. {
  4478. // 공지 내용 요청..
  4479. pWEB->m_nWantWrite = m_lbListContent.GetCurSel();
  4480. pWEB->DelayCommandPrepare(new CCommandView);
  4481. }
  4482. }
  4483. // Page buttons
  4484. else
  4485. {
  4486. for( int iPage = 0; iPage < pWEB->m_nValidPageBtnCount; iPage++ )
  4487. {
  4488. if( m_btnPage[iPage].MouseMessage( pMsg ) != WMSG_FAIL )
  4489. break;
  4490. }
  4491. }
  4492. }
  4493. // Read
  4494. else if( pWEB->m_nCurBoardType == UWT_READ )
  4495. {
  4496. // List button
  4497. m_btnList.MouseMessage( pMsg );
  4498. // Reply button
  4499. m_btnReply.MouseMessage( pMsg );
  4500. // Modify button
  4501. m_btnModify.MouseMessage( pMsg );
  4502. // Delete button
  4503. m_btnDelete.MouseMessage( pMsg );
  4504. // List box of read type
  4505. m_lbReadContent.MouseMessage( pMsg );
  4506. }
  4507. // Write
  4508. else if( pWEB->m_nCurBoardType == UWT_WRITE )
  4509. {
  4510. // List button
  4511. m_btnList.MouseMessage( pMsg );
  4512. // Write button
  4513. m_btnWrite.MouseMessage( pMsg );
  4514. if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4515. m_mebContent.SetFocus ( FALSE );
  4516. else if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4517. m_ebWriteSubject.SetFocus( FALSE );
  4518. }
  4519. // Reply
  4520. else if( pWEB->m_nCurBoardType == UWT_REPLY )
  4521. {
  4522. // List button
  4523. m_btnList.MouseMessage( pMsg );
  4524. // Write button
  4525. m_btnWrite.MouseMessage( pMsg );
  4526. if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4527. m_mebContent.SetFocus ( FALSE );
  4528. else if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4529. m_ebWriteSubject.SetFocus( FALSE );
  4530. }
  4531. // Modify
  4532. else if( pWEB->m_nCurBoardType == UWT_MODIFY )
  4533. {
  4534. // List button
  4535. m_btnList.MouseMessage( pMsg );
  4536. // Modify button
  4537. m_btnModify.MouseMessage( pMsg );
  4538. if ( m_ebWriteSubject.MouseMessage ( pMsg ) != WMSG_FAIL )
  4539. m_mebContent.SetFocus ( FALSE );
  4540. if ( m_mebContent.MouseMessage ( pMsg ) != WMSG_FAIL )
  4541. m_ebWriteSubject.SetFocus( FALSE );
  4542. }
  4543. }
  4544. break;
  4545. case WM_LBUTTONUP:
  4546. {
  4547. // List
  4548. if( pWEB->m_nCurBoardType == UWT_LIST )
  4549. {
  4550. // List box
  4551. if( m_lbListContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4552. return WMSG_SUCCESS;
  4553. // Search button
  4554. else if( ( wmsgResult = m_btnSearch.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4555. {
  4556. if( wmsgResult == WMSG_COMMAND )
  4557. {
  4558. if( m_ebSearch.GetString() )
  4559. {
  4560. pWEB->m_cmbSearch.SetCurSel(m_cmbSearch.GetCurSel());
  4561. pWEB->m_ebSearch.SetString(m_ebSearch.GetString());
  4562. pWEB->m_nWantPage = 1;
  4563. pWEB->DelayCommandPrepare(new CCommandList);
  4564. }
  4565. }
  4566. return WMSG_SUCCESS;
  4567. }
  4568. // Write button
  4569. else if( ( wmsgResult = m_btnWrite.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4570. {
  4571. if( wmsgResult == WMSG_COMMAND )
  4572. {
  4573. // user name input ...
  4574. // 글쓰기 요청
  4575. pWEB->m_nCurBoardType = UWT_WRITE;
  4576. pWEB->m_ebWriteSubject.ResetString();
  4577. //!!TODO:내용도 리셋.
  4578. m_ebWriteSubject.SetFocus ( TRUE );
  4579. m_mebContent.ResetString ();
  4580. m_mebContent.SetFocus ( FALSE );
  4581.  
  4582. }
  4583. return WMSG_SUCCESS;
  4584. }
  4585. // Prev button
  4586. else if( ( wmsgResult = m_btnPrev.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4587. {
  4588. if( wmsgResult == WMSG_COMMAND )
  4589. {
  4590. // 페이지 재설정
  4591. pWEB->m_nWantPage = pWEB->m_nCurrentPage - 10;
  4592. if(pWEB->m_nWantPage < 1) pWEB->m_nWantPage = 1;
  4593. pWEB->DelayCommandPrepare(new CCommandList);
  4594. }
  4595. return WMSG_SUCCESS;
  4596. }
  4597. // Next button
  4598. else if( ( wmsgResult = m_btnNext.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4599. {
  4600. if( wmsgResult == WMSG_COMMAND )
  4601. {
  4602. // 페이지 재설정
  4603. pWEB->m_nWantPage = pWEB->m_nCurrentPage + 10;
  4604. if(pWEB->m_nWantPage > pWEB->m_nTotalPage) pWEB->m_nWantPage = pWEB->m_nTotalPage;
  4605. pWEB->DelayCommandPrepare(new CCommandList);
  4606. }
  4607. return WMSG_SUCCESS;
  4608. }
  4609. // Page buttons
  4610. else
  4611. {
  4612. for( int iPage = 0; iPage < pWEB->m_nValidPageBtnCount; iPage++ )
  4613. {
  4614. if( ( wmsgResult = m_btnPage[iPage].MouseMessage( pMsg ) ) != WMSG_FAIL )
  4615. {
  4616. if( wmsgResult == WMSG_COMMAND )
  4617. {
  4618. // 페이지 변경 처리
  4619. pWEB->m_nWantPage = pWEB->m_nCurrentFirstPage + iPage;
  4620. pWEB->DelayCommandPrepare(new CCommandList);
  4621. }
  4622. return WMSG_SUCCESS;
  4623. }
  4624. }
  4625. }
  4626. }
  4627. // Read
  4628. else if( pWEB->m_nCurBoardType == UWT_READ )
  4629. {
  4630. // List button
  4631. if( ( wmsgResult = m_btnList.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4632. {
  4633. if( wmsgResult == WMSG_COMMAND )
  4634. {
  4635. // 목록 요청
  4636. pWEB->DelayCommandPrepare(new CCommandList);
  4637. pWEB->m_nCurBoardType = UWT_LIST;
  4638. pWEB->m_nWantPage = pWEB->m_nCurrentPage;
  4639. }
  4640. return WMSG_SUCCESS;
  4641. }
  4642. // Reply button
  4643. else if( ( wmsgResult = m_btnReply.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4644. {
  4645. if( wmsgResult == WMSG_COMMAND )
  4646. {
  4647. // 답글 페이지로
  4648. pWEB->m_nCurBoardType = UWT_REPLY;
  4649. CTString strTemp;
  4650. strTemp.PrintF("Re: %s", pWEB->m_strReadSubject);
  4651. m_ebWriteSubject.ResetString();
  4652. m_ebWriteSubject.InsertChars(0, strTemp.str_String);
  4653. //멀티에디터에 내용 삽입. 내용이 아래와 같이 수정됨.
  4654. //공백라인
  4655. //----<피답글의 작성자>이 쓰신 글입니다 -----
  4656. //모든 줄 앞에 '>' 삽입.
  4657.  
  4658. CTString strContent;
  4659.  
  4660. for ( int i = 0; i < m_lbReadContent.GetCurItemCount(0); i++ )
  4661. {
  4662. strContent += m_lbReadContent.GetString ( 0, i );
  4663. strContent += "\r\n";
  4664. }
  4665.  
  4666. m_ebWriteSubject.SetFocus ( FALSE );
  4667. m_mebContent.SetFocus ( TRUE );
  4668. m_mebContent.SetString ( strContent.str_String, pWEB->m_strReadName.str_String, ">" );
  4669. }
  4670. return WMSG_SUCCESS;
  4671. }
  4672. // Modify button
  4673. else if( ( wmsgResult = m_btnModify.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4674. {
  4675. if( wmsgResult == WMSG_COMMAND )
  4676. {
  4677. // 수정 페이지로
  4678. pWEB->m_nCurBoardType = UWT_MODIFY;
  4679. m_ebWriteSubject.ResetString();
  4680. m_ebWriteSubject.InsertChars(0, pWEB->m_strReadSubject.str_String);
  4681.  
  4682. //멀티에디터에 내용 삽입.
  4683. m_mebContent.ResetString();
  4684.  
  4685. CTString strContent;
  4686. for ( int i = 0; i < m_lbReadContent.GetCurItemCount(0); i++ )
  4687. {
  4688. strContent += m_lbReadContent.GetString ( 0, i );
  4689. strContent += "\r\n";
  4690. }
  4691. m_ebWriteSubject.SetFocus ( FALSE );
  4692. m_mebContent.SetFocus ( TRUE );
  4693. m_mebContent.SetString ( strContent.str_String );
  4694.  
  4695. }
  4696. return WMSG_SUCCESS;
  4697. }
  4698. // Delete button
  4699. else if( ( wmsgResult = m_btnDelete.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4700. {
  4701. if( wmsgResult == WMSG_COMMAND )
  4702. {
  4703. // 삭제 요청
  4704. //TODO : 예의상 한번 물어보자.
  4705. pWEB->m_nWantModifyMode = UWM_DELETE;
  4706. pWEB->DelayCommandPrepare(new CCommandModify);
  4707. }
  4708. return WMSG_SUCCESS;
  4709. }
  4710. // List box of read type
  4711. else if( m_lbReadContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4712. return WMSG_SUCCESS;
  4713. }
  4714. // Write
  4715. else if( pWEB->m_nCurBoardType == UWT_WRITE )
  4716. {
  4717. SetFocus ( TRUE );
  4718.  
  4719. // List button
  4720. if( ( wmsgResult = m_btnList.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4721. {
  4722. if( wmsgResult == WMSG_COMMAND )
  4723. {
  4724. // 목록 요청
  4725. pWEB->m_nWantPage = pWEB->m_nCurrentPage;
  4726. pWEB->DelayCommandPrepare(new CCommandList);
  4727. }
  4728. return WMSG_SUCCESS;
  4729. }
  4730. // Write button
  4731. else if( ( wmsgResult = m_btnWrite.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4732. {
  4733. if( wmsgResult == WMSG_COMMAND )
  4734. {
  4735. // 쓰기 요청
  4736. pWEB->m_nWantModifyMode = UWM_WRITE;
  4737. pWEB->m_ebWriteSubject.SetString( m_ebWriteSubject.GetString());
  4738. pWEB->m_mebContent.SetString(m_mebContent.GetString().str_String);
  4739. pWEB->DelayCommandPrepare(new CCommandModify);
  4740. }
  4741. return WMSG_SUCCESS;
  4742. }
  4743.  
  4744. }
  4745. // Reply
  4746. else if( pWEB->m_nCurBoardType == UWT_REPLY )
  4747. {
  4748. // List button
  4749. if( ( wmsgResult = m_btnList.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4750. {
  4751. if( wmsgResult == WMSG_COMMAND )
  4752. {
  4753. // 목록 요청
  4754. pWEB->m_nCurBoardType = UWT_LIST;
  4755. pWEB->m_nWantPage = pWEB->m_nCurrentPage;
  4756. pWEB->DelayCommandPrepare(new CCommandList);
  4757. }
  4758. return WMSG_SUCCESS;
  4759. }
  4760. // Write button
  4761. else if( ( wmsgResult = m_btnWrite.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4762. {
  4763. if( wmsgResult == WMSG_COMMAND )
  4764. {
  4765. // 쓰기 요청
  4766. pWEB->m_nWantModifyMode = UWM_REPLY;
  4767. pWEB->m_ebWriteSubject.SetString( m_ebWriteSubject.GetString());
  4768. pWEB->m_mebContent.SetString(m_mebContent.GetString().str_String);
  4769. pWEB->DelayCommandPrepare(new CCommandModify);
  4770. }
  4771. return WMSG_SUCCESS;
  4772. }
  4773.  
  4774. }
  4775. // Modify
  4776. else if( pWEB->m_nCurBoardType == UWT_MODIFY )
  4777. {
  4778. // List button
  4779. if( ( wmsgResult = m_btnList.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4780. {
  4781. if( wmsgResult == WMSG_COMMAND )
  4782. {
  4783. // 목록 요청
  4784. pWEB->m_nCurBoardType = UWT_LIST;
  4785. pWEB->m_nWantPage = pWEB->m_nCurrentPage;
  4786. pWEB->DelayCommandPrepare(new CCommandList);
  4787. }
  4788. return WMSG_SUCCESS;
  4789. }
  4790. // Modify button
  4791. else if( ( wmsgResult = m_btnModify.MouseMessage( pMsg ) ) != WMSG_FAIL )
  4792. {
  4793. if( wmsgResult == WMSG_COMMAND )
  4794. {
  4795. // 수정 요청
  4796. pWEB->m_ebWriteSubject.SetString( m_ebWriteSubject.GetString() );
  4797. pWEB->m_mebContent.SetString( m_mebContent.GetString().str_String );
  4798. pWEB->m_nWantModifyMode = UWM_MODIFY;
  4799. pWEB->DelayCommandPrepare(new CCommandModify);
  4800. }
  4801. return WMSG_SUCCESS;
  4802. }
  4803.  
  4804. }
  4805. }
  4806. break;
  4807. case WM_MOUSEWHEEL:
  4808. {
  4809. // Read
  4810. if( pWEB->m_nCurBoardType == UWT_READ )
  4811. {
  4812. // List box of read type
  4813. if( m_lbReadContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4814. return WMSG_SUCCESS;
  4815. }
  4816. else if( pWEB->m_nCurBoardType == UWT_WRITE )
  4817. {
  4818. if( m_mebContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4819. return WMSG_SUCCESS;
  4820. }
  4821. else if( pWEB->m_nCurBoardType == UWT_REPLY )
  4822. {
  4823. if( m_mebContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4824. return WMSG_SUCCESS;
  4825. }
  4826. else if( pWEB->m_nCurBoardType == UWT_MODIFY )
  4827. {
  4828. if( m_mebContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4829. return WMSG_SUCCESS;
  4830. }
  4831.  
  4832. }
  4833. break;
  4834.  
  4835. case WM_LBUTTONDBLCLK:
  4836. {
  4837. // Read
  4838. if( pWEB->m_nCurBoardType == UWT_READ )
  4839. {
  4840. // List box of read type
  4841. if( m_lbReadContent.MouseMessage( pMsg ) != WMSG_FAIL )
  4842. return WMSG_SUCCESS;
  4843. }
  4844. }
  4845. break;
  4846. }
  4847.  
  4848. return WMSG_FAIL;
  4849. }
  4850.  
  4851. // ----------------------------------------------------------------------------
  4852. // Name : MouseMessage()
  4853. // Desc :
  4854. // ----------------------------------------------------------------------------
  4855. WMSG_RESULT CUIGuild::MouseMessageNew( MSG *pMsg )
  4856. {
  4857. WMSG_RESULT wmsgResult;
  4858.  
  4859. // Title bar
  4860. static BOOL bTitleBarClick = FALSE;
  4861. // Extended button clicked
  4862. static BOOL bLButtonDownInBtn = FALSE;
  4863. // Mouse point
  4864. static int nOldX, nOldY;
  4865. int nX = LOWORD( pMsg->lParam );
  4866. int nY = HIWORD( pMsg->lParam );
  4867. int i = 0;
  4868.  
  4869. // Mouse message
  4870. switch( pMsg->message )
  4871. {
  4872. case WM_MOUSEMOVE:
  4873. {
  4874. int ndX = nX - nOldX;
  4875. int ndY = nY - nOldY;
  4876.  
  4877. // Move Window
  4878. if( bTitleBarClick && ( pMsg->wParam & MK_LBUTTON ) )
  4879. {
  4880. nOldX = nX; nOldY = nY;
  4881.  
  4882. Move( ndX, ndY );
  4883.  
  4884. return WMSG_SUCCESS;
  4885. }
  4886.  
  4887. if( IsInsideRect( nX, nY ,m_rcWindowNew) )
  4888. {
  4889. // Close button
  4890. m_btnCloseNew.MouseMessage( pMsg );
  4891. // 닫기 버튼
  4892. m_btnExitNew.MouseMessage(pMsg);
  4893.  
  4894. CUIManager* pUIManager = CUIManager::getSingleton();
  4895.  
  4896. pUIManager->SetMouseCursorInsideUIs();
  4897.  
  4898. CUIIcon* pBtnSkill = NULL;
  4899. int nScrollBarPos, nGuildSkillCount, i;
  4900. m_strSkillTabPopupInfo.Clear();
  4901. switch(m_iSelTab)
  4902. {
  4903. case NEW_GUILD_INFO:
  4904. // List
  4905. m_btnEdit.MouseMessage( pMsg );
  4906. m_lbMemberAllianceList.MouseMessage( pMsg );
  4907. m_lbMemberHostilityList.MouseMessage( pMsg );
  4908. break;
  4909. case NEW_GUILD_MEMBER_INFO:
  4910. m_lbGuildMemberList.MouseMessage( pMsg );
  4911. break;
  4912. case NEW_GUILD_SKILL:
  4913. m_btnGetSkill.MouseMessage(pMsg);
  4914.  
  4915. if ( m_sbGuildSkillBar.MouseMessage( pMsg ) != WMSG_FAIL )
  4916. {
  4917. SetSkillBtnInfo();
  4918. }
  4919. m_lbGuildSkillDesc.MouseMessage( pMsg );
  4920. nScrollBarPos = m_sbGuildSkillBar.GetScrollPos();
  4921. nGuildSkillCount = GetGuildSkillCount();
  4922. for ( i=0; i<5; ++i )
  4923. {
  4924. if ( nScrollBarPos+i < nGuildSkillCount )
  4925. {
  4926. pBtnSkill = GetSkillButton(nScrollBarPos+i);
  4927.  
  4928. pBtnSkill->MouseMessage( pMsg );
  4929. }
  4930. }
  4931. if (pUIManager->GetDragIcon() == NULL && bLButtonDownInBtn &&
  4932. (pMsg->wParam& MK_LBUTTON) && (ndX != 0 || ndY != 0))
  4933. {
  4934. CSkill* pSkill = GetGuildSkill(m_iGuildSkillPos);
  4935. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE && pSkill->GetCurLevel() > 0)
  4936. {
  4937. if (pSkill->GetTargetType() == CSkill::STT_GUILD_MEMBER_SELF ||
  4938. _pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS)
  4939. {
  4940. pBtnSkill = GetSkillButton(m_iGuildSkillPos);
  4941. pUIManager->SetHoldBtn(pBtnSkill);
  4942. bLButtonDownInBtn = FALSE;
  4943. }
  4944. }
  4945. }
  4946. if (m_lbUseInfo.MouseMessage( pMsg ) != WMSG_FAIL ||
  4947. m_lbLearnInfo.MouseMessage( pMsg ) != WMSG_FAIL ||
  4948. m_btnUseSkill.MouseMessage( pMsg ) != WMSG_FAIL )
  4949. return WMSG_SUCCESS;
  4950.  
  4951. for ( i=0; i<2; ++i )
  4952. {
  4953. if ( IsInsideRect( nX, nY, m_rcSkillTab[i] ) )
  4954. {
  4955. SetSkillPopupInfo(i);
  4956. }
  4957. }
  4958. break;
  4959. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  4960. case NEW_GUILD_BOARD:
  4961. MouseMessageNewBoard(pMsg);
  4962. break;
  4963. #endif
  4964. case NEW_GUILD_NOTICE:
  4965. m_btnNotice.MouseMessage(pMsg);
  4966. m_btnNoticeCorrect.MouseMessage(pMsg);
  4967. m_btnUpdateNotice.MouseMessage(pMsg);
  4968. m_ebNoticeTitle.MouseMessage( pMsg );
  4969. m_mebNoticeContent.MouseMessage( pMsg );
  4970. break;
  4971. case NEW_GUILD_MANAGE:
  4972. m_lbManageMemberList.MouseMessage( pMsg );
  4973. m_cmbCorps.MouseMessage( pMsg );
  4974.  
  4975. m_btnChangeBossNew.MouseMessage( pMsg );
  4976. m_btnAcceptNew.MouseMessage( pMsg );
  4977. m_btnRejectNew.MouseMessage( pMsg );
  4978. m_btnMemberFireNew.MouseMessage( pMsg );
  4979. m_btnChangeSetting.MouseMessage( pMsg );
  4980.  
  4981. m_btnApplySetting.MouseMessage( pMsg );
  4982. m_btnApplySettingClose.MouseMessage( pMsg );
  4983. break;
  4984. }
  4985. return WMSG_SUCCESS;
  4986. }
  4987. }
  4988. break;
  4989. case WM_LBUTTONDOWN:
  4990. {
  4991. if( IsInsideRect( nX, nY ,m_rcWindowNew) )
  4992. {
  4993. for (i = 0; i < eGML_MAX; ++i)
  4994. {
  4995. if (m_pCbMemberArrange[i]->OnLButtonDown(nX, nY) != WMSG_FAIL)
  4996. return WMSG_SUCCESS;
  4997. }
  4998.  
  4999. CUIManager* pUIManager = CUIManager::getSingleton();
  5000. nOldX = nX;
  5001. nOldY = nY;
  5002.  
  5003. if (pUIManager->GetGuild()->IsEnabled() && !pUIManager->GetGuild()->IsVisible())
  5004. {
  5005. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  5006. }
  5007.  
  5008. // Close button
  5009. m_btnCloseNew.MouseMessage( pMsg );
  5010. // 닫기 버튼
  5011. m_btnExitNew.MouseMessage(pMsg);
  5012. // Title bar
  5013. if( IsInsideRect( nX, nY, m_rcTitleNew ) )
  5014. {
  5015. bTitleBarClick = TRUE;
  5016. }
  5017.  
  5018. switch(m_iSelTab)
  5019. {
  5020. case NEW_GUILD_INFO:
  5021. // Edit button
  5022. m_btnEdit.MouseMessage( pMsg );
  5023. // List
  5024. m_lbMemberAllianceList.MouseMessage( pMsg );
  5025. m_lbMemberHostilityList.MouseMessage( pMsg );
  5026. break;
  5027. case NEW_GUILD_MEMBER_INFO:
  5028. m_lbGuildMemberList.MouseMessage( pMsg );
  5029. break;
  5030. case NEW_GUILD_SKILL:
  5031. m_btnGetSkill.MouseMessage( pMsg );
  5032. m_lbGuildSkillDesc.MouseMessage( pMsg );
  5033. if(m_sbGuildSkillBar.MouseMessage( pMsg ) != WMSG_FAIL )
  5034. {
  5035. SetSkillBtnInfo();
  5036. }
  5037. else if ( IsInsideRect( nX, nY, m_rcGuildSkillList) )
  5038. {
  5039. int nScrollBarPos = m_sbGuildSkillBar.GetScrollPos();
  5040. int nGuildSkillCount = GetGuildSkillCount();
  5041. CUIIcon* pBtnSkill = NULL;
  5042. for ( int i=0; i<5; ++i )
  5043. {
  5044. if ( nScrollBarPos+i < nGuildSkillCount )
  5045. {
  5046. pBtnSkill = GetSkillButton(nScrollBarPos+i);
  5047. if (pBtnSkill->MouseMessage( pMsg ) != WMSG_FAIL )
  5048. {
  5049. m_iGuildSkillPos = nScrollBarPos + i;
  5050. bLButtonDownInBtn = TRUE;
  5051. break;
  5052. }
  5053. }
  5054. }
  5055. }
  5056. else if ( IsInsideRect( nX, nY, m_rcSkillTab[GUILD_SKILL_PASSIVE]) )
  5057. {
  5058. m_nSelSkillTab = GUILD_SKILL_PASSIVE;
  5059. m_iGuildSkillPos = 0;
  5060. m_bIsSelList = FALSE;
  5061. m_sbGuildSkillBar.SetScrollPos( 0 );
  5062. m_lbGuildSkillDesc.ResetAllStrings();
  5063. m_lbUseInfo.ResetAllStrings();
  5064. m_lbLearnInfo.ResetAllStrings();
  5065. m_sbGuildSkillBar.SetCurItemCount(m_vecGuildPassiveSkill.size());
  5066. SetSkillBtnInfo();
  5067. }
  5068. else if ( IsInsideRect( nX, nY, m_rcSkillTab[GUILD_SKILL_ACTIVE]) )
  5069. {
  5070. m_nSelSkillTab = GUILD_SKILL_ACTIVE;
  5071. m_iGuildSkillPos = 0;
  5072. m_bIsSelList = FALSE;
  5073. m_sbGuildSkillBar.SetScrollPos( 0 );
  5074. m_lbGuildSkillDesc.ResetAllStrings();
  5075. m_lbUseInfo.ResetAllStrings();
  5076. m_lbLearnInfo.ResetAllStrings();
  5077. m_sbGuildSkillBar.SetCurItemCount(m_vecGuildActiveSkill.size());
  5078. SetSkillBtnInfo();
  5079. }
  5080. if (m_lbUseInfo.MouseMessage( pMsg ) != WMSG_FAIL ||
  5081. m_lbLearnInfo.MouseMessage( pMsg ) != WMSG_FAIL ||
  5082. m_btnUseSkill.MouseMessage( pMsg ) != WMSG_FAIL )
  5083. return WMSG_SUCCESS;
  5084.  
  5085. break;
  5086. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  5087. case NEW_GUILD_BOARD:
  5088. MouseMessageNewBoard(pMsg);
  5089. break;
  5090. #endif
  5091. case NEW_GUILD_NOTICE:
  5092. if( m_bEnableCorrect )
  5093. {
  5094. if( m_ebNoticeTitle.MouseMessage( pMsg ) != WMSG_FAIL )
  5095. {
  5096. m_ebNoticeTitle.SetFocus(TRUE);
  5097. m_mebNoticeContent.SetFocus(FALSE);
  5098. }
  5099. else if( m_mebNoticeContent.MouseMessage( pMsg ) != WMSG_FAIL )
  5100. {
  5101. m_ebNoticeTitle.SetFocus(FALSE);
  5102. m_mebNoticeContent.SetFocus(TRUE);
  5103. }
  5104. else
  5105. {
  5106. m_ebNoticeTitle.SetFocus(FALSE);
  5107. m_mebNoticeContent.SetFocus(FALSE);
  5108. }
  5109. }
  5110. m_btnNotice.MouseMessage( pMsg );
  5111. m_btnNoticeCorrect.MouseMessage( pMsg );
  5112. m_btnUpdateNotice.MouseMessage( pMsg );
  5113.  
  5114. break;
  5115. case NEW_GUILD_MANAGE:
  5116. if(m_bApplySettingOn)
  5117. {
  5118. if ( (wmsgResult = m_cmbCorps.MouseMessage( pMsg )) != WMSG_FAIL )
  5119. {
  5120. m_ebChangePositionName.SetFocus(FALSE);
  5121. m_ebChangePayExp.SetFocus(FALSE);
  5122. m_ebChangePayFame.SetFocus(FALSE);
  5123. m_cmbCorps.SetFocus(TRUE);
  5124. break;
  5125. }
  5126. m_btnApplySetting.MouseMessage( pMsg );
  5127. m_btnApplySettingClose.MouseMessage( pMsg );
  5128. #ifdef ENABLE_GUILD_STASH
  5129. m_ckGuildStashPermission.MouseMessage( pMsg );
  5130. #endif
  5131. if( (wmsgResult = m_ebChangePositionName.MouseMessage( pMsg )) != WMSG_FAIL )
  5132. {
  5133. m_ebChangePositionName.SetFocus(TRUE);
  5134. m_ebChangePayFame.SetFocus(FALSE);
  5135. m_ebChangePayExp.SetFocus(FALSE);
  5136. m_cmbCorps.SetFocus(FALSE);
  5137. }
  5138. else if( (wmsgResult = m_ebChangePayExp.MouseMessage( pMsg )) != WMSG_FAIL )
  5139. {
  5140. m_ebChangePositionName.SetFocus(FALSE);
  5141. m_ebChangePayFame.SetFocus(FALSE);
  5142. m_ebChangePayExp.SetFocus(TRUE);
  5143. m_cmbCorps.SetFocus(FALSE);
  5144. }
  5145. else if( (wmsgResult = m_ebChangePayFame.MouseMessage( pMsg )) != WMSG_FAIL )
  5146. {
  5147. m_ebChangePositionName.SetFocus(FALSE);
  5148. m_ebChangePayExp.SetFocus(FALSE);
  5149. m_ebChangePayFame.SetFocus(TRUE);
  5150. m_cmbCorps.SetFocus(FALSE);
  5151. }
  5152. else
  5153. {
  5154. m_ebChangePositionName.SetFocus(FALSE);
  5155. m_ebChangePayExp.SetFocus(FALSE);
  5156. m_ebChangePayFame.SetFocus(FALSE);
  5157. m_cmbCorps.SetFocus(FALSE);
  5158. wmsgResult = WMSG_SUCCESS;
  5159. }
  5160.  
  5161. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  5162. return wmsgResult;
  5163. }
  5164. else
  5165. {
  5166. m_btnChangeBossNew.MouseMessage( pMsg );
  5167. m_btnAcceptNew.MouseMessage( pMsg );
  5168. m_btnRejectNew.MouseMessage( pMsg );
  5169. m_btnMemberFireNew.MouseMessage( pMsg );
  5170. m_btnChangeSetting.MouseMessage( pMsg );
  5171. m_lbManageMemberList.MouseMessage( pMsg );
  5172. }
  5173. break;
  5174. }
  5175.  
  5176.  
  5177. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  5178. return WMSG_SUCCESS;
  5179. }
  5180. }
  5181. break;
  5182. case WM_LBUTTONUP:
  5183. {
  5184. CUIManager* pUIManager = CUIManager::getSingleton();
  5185. bTitleBarClick = FALSE;
  5186. bLButtonDownInBtn = FALSE;
  5187. int nGuildSkillCount = GetGuildSkillCount();
  5188.  
  5189. if (pUIManager->GetDragIcon() == NULL)
  5190. {
  5191. // tab
  5192. if(!m_bApplySettingOn)
  5193. {
  5194. for(int i=0; i<MAX_GUILDINFO_TAB;i++)
  5195. {
  5196. if( IsInsideRect( nX, nY, m_rcTabNew[i] ) )
  5197. {
  5198. if( m_iSelTab != i)
  5199. {
  5200. int tOldTab = m_iSelTab;
  5201. m_iSelTab = i;
  5202.  
  5203. switch(m_iSelTab)
  5204. {
  5205. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  5206. case NEW_GUILD_BOARD:
  5207. {
  5208. // TODO :: 임시로 게시판 막음... 이후 웹팀 작업되면 추가
  5209. // m_iSelTab = tOldTab;
  5210. // pUIManager->GetChattingUI()->AddSysMessage( _s( "현재 버전은 지원하지 않습니다." ) );
  5211. // return WMSG_SUCCESS;
  5212.  
  5213. pWEB->m_nWantPage = 1;
  5214. pWEB->DelayCommandPrepare(new CCommandList);
  5215. return WMSG_SUCCESS;
  5216. }
  5217. break;
  5218. #endif
  5219. case NEW_GUILD_NOTICE:
  5220. {
  5221. m_iSelTab = tOldTab;
  5222. m_bEnableCorrect = FALSE; // 공지사항 수정여부
  5223. SendRequestGuildTab(NEW_GUILD_NOTICE);
  5224. return WMSG_SUCCESS;
  5225. }
  5226. break;
  5227. case NEW_GUILD_MANAGE:
  5228. {
  5229. if( _pNetwork->MyCharacterInfo.lGuildPosition != GUILD_MEMBER_BOSS &&
  5230. _pNetwork->MyCharacterInfo.lGuildPosition != GUILD_MEMBER_VICE_BOSS)
  5231. {
  5232. m_iSelTab = tOldTab;
  5233. return WMSG_SUCCESS;
  5234. }
  5235. }
  5236. break;
  5237. case NEW_GUILD_SKILL:
  5238. {
  5239. SetSkillBtnInfo();
  5240. }
  5241. break;
  5242. }
  5243.  
  5244. // 길드 정보 요청
  5245. SendRequestGuildTab(m_iSelTab);
  5246. break;
  5247. }
  5248. }
  5249. }
  5250. }
  5251.  
  5252. // Close button
  5253. if( (wmsgResult = m_btnCloseNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5254. {
  5255. if(wmsgResult == WMSG_COMMAND)
  5256. {
  5257. ResetGuild();
  5258. InitNewGuildSystem();
  5259. }
  5260. return WMSG_SUCCESS;
  5261. }
  5262. if( (wmsgResult = m_btnExitNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5263. {
  5264. if(wmsgResult == WMSG_COMMAND)
  5265. {
  5266. ResetGuild();
  5267. InitNewGuildSystem();
  5268. }
  5269. return WMSG_SUCCESS;
  5270. }
  5271.  
  5272. switch(m_iSelTab)
  5273. {
  5274. case NEW_GUILD_INFO:
  5275. {
  5276. // Edit button
  5277. if( (wmsgResult = m_btnEdit.MouseMessage( pMsg )) != WMSG_FAIL)
  5278. {
  5279. if(wmsgResult == WMSG_COMMAND)
  5280. {
  5281. // TODO : 길드마크 에디트 기획완료후 작업
  5282. // [sora] GUILD_MARK
  5283. #ifdef GUILD_MARK
  5284. _pNetwork->SendGuildMarkWndOpenReq();
  5285. #endif
  5286. }
  5287. return WMSG_SUCCESS;
  5288. }
  5289. // List
  5290. if( (wmsgResult = m_lbMemberAllianceList.MouseMessage( pMsg )) != WMSG_FAIL )
  5291. {
  5292. return WMSG_SUCCESS;
  5293. }
  5294. }
  5295. break;
  5296. case NEW_GUILD_MEMBER_INFO:
  5297.  
  5298. break;
  5299. case NEW_GUILD_SKILL:
  5300. {
  5301. if(IsInsideRect(nX,nY,m_rcGuildSkillList) )
  5302. {
  5303. m_lbGuildSkillDesc.ResetAllStrings();
  5304. m_lbUseInfo.ResetAllStrings();
  5305. m_lbLearnInfo.ResetAllStrings();
  5306. INDEX iMaxChar = 35;
  5307.  
  5308. m_iGuildSkillPos = (nY-(m_nPosY+m_rcGuildSkillList.Top))/40 + m_sbGuildSkillBar.GetScrollPos();
  5309.  
  5310. if (nGuildSkillCount>m_iGuildSkillPos)
  5311. {
  5312. m_bIsSelList = TRUE;
  5313. SetGuildSkillInfo();
  5314. iMaxChar = 45;
  5315. }
  5316. else
  5317. {
  5318. m_bIsSelList = FALSE;
  5319. m_iGuildSkillPos = 0;
  5320. }
  5321.  
  5322. CSkill* pSkill = GetGuildSkill(m_iGuildSkillPos);
  5323. if( pSkill != NULL )
  5324. {
  5325. pUIManager->AddStringToList(
  5326. &m_lbGuildSkillDesc,
  5327. CTString(pSkill->GetDescription()),
  5328. iMaxChar);
  5329. }
  5330. CUIIcon* pBtnSkill = NULL;
  5331. int nScrollBarPos = m_sbGuildSkillBar.GetScrollPos();
  5332. for (int i=0; i<5; ++i)
  5333. {
  5334. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE )
  5335. {
  5336. nGuildSkillCount = m_vecGuildActiveSkill.size();
  5337. }
  5338. if ( nScrollBarPos+i < nGuildSkillCount )
  5339. {
  5340. pBtnSkill = GetSkillButton(nScrollBarPos+i);
  5341. if ( pBtnSkill->MouseMessage( pMsg ) == WMSG_SUCCESS )
  5342. break;
  5343. }
  5344. }
  5345. }
  5346. else if ( (wmsgResult=m_btnGetSkill.MouseMessage( pMsg )) != WMSG_FAIL)
  5347. {
  5348. if(wmsgResult == WMSG_COMMAND)
  5349. {
  5350. // TODO : 기술 습득 요청
  5351. CSkill* pSkill = GetGuildSkill(m_iGuildSkillPos);
  5352. if( pSkill != NULL )
  5353. SendLearnGuildSkill(pSkill->GetIndex());
  5354. }
  5355. return WMSG_SUCCESS;
  5356. }
  5357. else if( (wmsgResult=m_sbGuildSkillBar.MouseMessage( pMsg )) != WMSG_FAIL)
  5358. {
  5359. SetGuildSkillInfo();
  5360. return WMSG_SUCCESS;
  5361. }
  5362. else if( (wmsgResult=m_lbGuildSkillDesc.MouseMessage( pMsg )) != WMSG_FAIL)
  5363. {
  5364. return WMSG_SUCCESS;
  5365. }
  5366. else if (m_lbUseInfo.MouseMessage( pMsg ) != WMSG_FAIL )
  5367. {
  5368. return WMSG_SUCCESS;
  5369. }
  5370. else if (m_lbLearnInfo.MouseMessage( pMsg ) != WMSG_FAIL )
  5371. {
  5372. return WMSG_SUCCESS;
  5373. }
  5374. else if ( m_btnUseSkill.MouseMessage( pMsg ) != WMSG_FAIL )
  5375. {
  5376. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE && m_iGuildSkillPos >= 0 && m_bIsSelList)
  5377. { // 액티브 스킬일 경우, 선택한 스킬이 있는 경우,
  5378. CSkill* pSkill = GetGuildSkill(m_iGuildSkillPos);
  5379. int nSkillIndex = pSkill->GetIndex();
  5380. if ( CheckUseGuildSkill(nSkillIndex) )
  5381. {
  5382. pUIManager->GetCharacterInfo()->UseSkill(nSkillIndex);
  5383. }
  5384. }
  5385. }
  5386. }
  5387. break;
  5388. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  5389. case NEW_GUILD_BOARD:
  5390. MouseMessageNewBoard(pMsg);
  5391. break;
  5392. #endif
  5393. case NEW_GUILD_NOTICE:
  5394. {
  5395. if( m_bEnableCorrect )
  5396. {
  5397. m_ebNoticeTitle.MouseMessage( pMsg );
  5398. m_mebNoticeContent.MouseMessage( pMsg );
  5399. }
  5400.  
  5401. if ( m_btnNotice.MouseMessage( pMsg ) == WMSG_COMMAND)
  5402. {
  5403. SendRequestGuildNotice();
  5404. return WMSG_SUCCESS;
  5405. }
  5406. else if ( m_btnNoticeCorrect.MouseMessage( pMsg ) == WMSG_COMMAND)
  5407. {
  5408. // TODO :: 수정창 활성화
  5409. m_bEnableCorrect = TRUE;
  5410. m_ebNoticeTitle.SetFocus(FALSE);
  5411. m_mebNoticeContent.SetFocus(TRUE);
  5412. return WMSG_SUCCESS;
  5413. }
  5414. else if ( m_btnUpdateNotice.MouseMessage( pMsg ) == WMSG_COMMAND)
  5415. {
  5416. SendUpdateGuildNotice(m_ebNoticeTitle.GetString(),m_mebNoticeContent.GetString());
  5417. return WMSG_SUCCESS;
  5418. }
  5419. }
  5420. break;
  5421. case NEW_GUILD_MANAGE:
  5422. {
  5423. if(m_bApplySettingOn)
  5424. {
  5425. if ( (wmsgResult = m_cmbCorps.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5426. {
  5427. return WMSG_SUCCESS;
  5428. }
  5429. if( (wmsgResult = m_btnApplySetting.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5430. {
  5431. if(wmsgResult == WMSG_COMMAND)
  5432. {
  5433. if( CheckDataValidation() )
  5434. {
  5435. // TODO :: send apply message
  5436. SendAdjustGuildMemberInfo(
  5437. m_vManageMemberIndex[m_lbManageMemberList.GetCurSel()],
  5438. m_ebChangePositionName.GetString(),
  5439. atoi(m_ebChangePayExp.GetString()),
  5440. atoi(m_ebChangePayFame.GetString())
  5441. , GetSelectedPositon()
  5442. #ifdef ENABLE_GUILD_STASH
  5443. ,(UBYTE)m_ckGuildStashPermission.IsChecked()
  5444. #endif // ENABLE_GUILD_STASH
  5445. );
  5446. }
  5447. // 비활성화
  5448. SetManagePopup(FALSE);
  5449. }
  5450. return WMSG_SUCCESS;
  5451. }
  5452. if( (wmsgResult = m_btnApplySettingClose.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5453. {
  5454. if(wmsgResult == WMSG_COMMAND)
  5455. {
  5456. // 비활성화
  5457. SetManagePopup(FALSE);
  5458. }
  5459. return WMSG_SUCCESS;
  5460. }
  5461. #ifdef ENABLE_GUILD_STASH
  5462. if( (wmsgResult = m_ckGuildStashPermission.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5463. {
  5464. return WMSG_SUCCESS;
  5465. }
  5466. #endif
  5467. if( (wmsgResult = m_ebChangePositionName.MouseMessage( pMsg )) != WMSG_FAIL )
  5468. {
  5469. return WMSG_SUCCESS;
  5470. }
  5471. if( (wmsgResult = m_ebChangePayExp.MouseMessage( pMsg )) != WMSG_FAIL )
  5472. {
  5473. return WMSG_SUCCESS;
  5474. }
  5475. if( (wmsgResult = m_ebChangePayFame.MouseMessage( pMsg )) != WMSG_FAIL )
  5476. {
  5477. return WMSG_SUCCESS;
  5478. }
  5479. }
  5480. else
  5481. {
  5482. // Change Boss(단장 이임)
  5483. if( (wmsgResult = m_btnChangeBossNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5484. {
  5485. if(wmsgResult == WMSG_COMMAND)
  5486. {
  5487. ChangeBoss();
  5488. }
  5489. return WMSG_SUCCESS;
  5490. }
  5491. // Accept(부단장 임명)
  5492. else if( (wmsgResult = m_btnAcceptNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5493. {
  5494. if(wmsgResult == WMSG_COMMAND)
  5495. {
  5496. AddViceBoss();
  5497. }
  5498. return WMSG_SUCCESS;
  5499. }
  5500. // Reject(부단장 해임)
  5501. else if( (wmsgResult = m_btnRejectNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5502. {
  5503. if(wmsgResult == WMSG_COMMAND)
  5504. {
  5505. DelViceBoss();
  5506. }
  5507. return WMSG_SUCCESS;
  5508. }
  5509. // Member fire(단원 퇴출)
  5510. else if( (wmsgResult = m_btnMemberFireNew.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5511. {
  5512. if(wmsgResult == WMSG_COMMAND)
  5513. {
  5514. MemberFire();
  5515. }
  5516. return WMSG_SUCCESS;
  5517. }
  5518. // 설정 변경
  5519. else if( (wmsgResult = m_btnChangeSetting.MouseMessage( pMsg ) ) != WMSG_FAIL )
  5520. {
  5521. // 활성화
  5522. if(m_lbManageMemberList.GetCurSel()>=0)
  5523. {
  5524. ResetManagePopupString();
  5525. SetManagePopup(TRUE);
  5526. }
  5527. return WMSG_SUCCESS;
  5528. }
  5529. }
  5530. }
  5531. break;
  5532. }
  5533.  
  5534. }
  5535. else
  5536. {
  5537. if( IsInside( nX, nY ) )
  5538. {
  5539. // Reset holding button
  5540. pUIManager->ResetHoldBtn();
  5541.  
  5542. return WMSG_SUCCESS;
  5543. }
  5544. }
  5545.  
  5546. }
  5547. break;
  5548.  
  5549. case WM_MOUSEWHEEL:
  5550. {
  5551. if( IsInsideRect( nX, nY , m_rcWindowNew ) )
  5552. {
  5553. switch(m_iSelTab)
  5554. {
  5555. case NEW_GUILD_INFO:
  5556. // List
  5557. m_lbMemberAllianceList.MouseMessage( pMsg );
  5558. m_lbMemberHostilityList.MouseMessage( pMsg );
  5559. break;
  5560. case NEW_GUILD_MEMBER_INFO:
  5561. m_lbGuildMemberList.MouseMessage( pMsg );
  5562. break;
  5563. case NEW_GUILD_SKILL:
  5564. if ( m_sbGuildSkillBar.MouseMessage( pMsg ) != WMSG_FAIL )
  5565. {
  5566. SetSkillBtnInfo();
  5567. return WMSG_SUCCESS;
  5568. }
  5569. else if ( m_lbUseInfo.MouseMessage( pMsg ) != WMSG_FAIL )
  5570. {
  5571. return WMSG_SUCCESS;
  5572. }
  5573. else if ( m_lbLearnInfo.MouseMessage( pMsg ) != WMSG_FAIL )
  5574. {
  5575. return WMSG_SUCCESS;
  5576. }
  5577. else if ( m_lbGuildSkillDesc.MouseMessage( pMsg ) != WMSG_FAIL )
  5578. {
  5579. return WMSG_SUCCESS;
  5580. }
  5581. break;
  5582. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  5583. case NEW_GUILD_BOARD:
  5584. MouseMessageNewBoard(pMsg);
  5585. break;
  5586. #endif
  5587. case NEW_GUILD_NOTICE:
  5588. m_ebNoticeTitle.MouseMessage( pMsg );
  5589. m_mebNoticeContent.MouseMessage( pMsg );
  5590. break;
  5591. case NEW_GUILD_MANAGE:
  5592. m_lbManageMemberList.MouseMessage( pMsg );
  5593. break;
  5594. }
  5595.  
  5596. return WMSG_SUCCESS;
  5597. }
  5598. }
  5599. break;
  5600. case WM_RBUTTONDOWN:
  5601. {
  5602. CUIManager* pUIManager = CUIManager::getSingleton();
  5603.  
  5604. if( m_lbGuildMemberList.IsInside( nX, nY) )
  5605. {
  5606. if (pUIManager->GetGuild()->IsEnabled() && !pUIManager->GetGuild()->IsVisible())
  5607. {
  5608. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  5609. }
  5610.  
  5611. CTString strTargetName;
  5612. switch(m_iSelTab)
  5613. {
  5614. case NEW_GUILD_MEMBER_INFO:
  5615. {
  5616. int nAddPos = m_lbGuildMemberList.GetScrollBarPos();
  5617.  
  5618. if (nAddPos < 0)
  5619. nAddPos = 0;
  5620.  
  5621. return OpenGuildPop(m_lbGuildMemberList.GetCurOverList() + nAddPos, nX, nY);
  5622. }
  5623. break;
  5624. }
  5625. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  5626. return WMSG_SUCCESS;
  5627. }
  5628. else
  5629. {
  5630. pUIManager->GetSimplePop()->ClosePop();
  5631. }
  5632. }
  5633. break;
  5634. case WM_LBUTTONDBLCLK :
  5635. case WM_RBUTTONDBLCLK :
  5636. return WMSG_SUCCESS;
  5637. }
  5638. return WMSG_FAIL;
  5639. }
  5640.  
  5641. void CUIGuild::SetManagePopup(BOOL bEnable)
  5642. {
  5643. m_bApplySettingOn = bEnable;
  5644. m_btnApplySetting.SetEnable(bEnable);
  5645. m_btnApplySettingClose.SetEnable(bEnable);
  5646. m_ebChangePositionName.SetEnable(bEnable);
  5647. m_ebChangePayExp.SetEnable(bEnable);
  5648. m_ebChangePayFame.SetEnable(bEnable);
  5649. m_btnExitNew.SetEnable(!bEnable);
  5650. m_btnCloseNew.SetEnable(!bEnable);
  5651. // data setting. [6/24/2011 rumist]
  5652. if( bEnable )
  5653. {
  5654. CTString strTemp = m_lbManageMemberList.GetString( 1, m_lbManageMemberList.GetCurSel() );
  5655. m_ebChangePositionName.SetString( strTemp.str_String );
  5656. strTemp = m_lbManageMemberList.GetString( 4, m_lbManageMemberList.GetCurSel() );
  5657. strTemp.DeleteChar( strTemp.Length()-1 );
  5658. m_ebChangePayExp.SetString( strTemp.str_String );
  5659. strTemp = m_lbManageMemberList.GetString( 5, m_lbManageMemberList.GetCurSel() );
  5660. strTemp.DeleteChar( strTemp.Length()-1 );
  5661. m_ebChangePayFame.SetString( strTemp.str_String );
  5662. }
  5663. #ifdef ENABLE_GUILD_STASH
  5664. m_ckGuildStashPermission.SetEnable( bEnable );
  5665. if( bEnable )
  5666. {
  5667. CTString strTemp = m_lbManageMemberList.GetString( 6, m_lbManageMemberList.GetCurSel() );
  5668. m_ckGuildStashPermission.SetCheck( strTemp == _S(5560, "가능") ? TRUE : FALSE );
  5669. }
  5670. #endif
  5671. m_cmbCorps.SetEnable(bEnable);
  5672. if ( bEnable )
  5673. SetCorpsComboBox();
  5674. }
  5675.  
  5676. void CUIGuild::ResetManagePopupString()
  5677. {
  5678. m_ebChangePositionName.ResetString();
  5679. m_ebChangePayExp.ResetString();
  5680. m_ebChangePayFame.ResetString();
  5681. #ifdef ENABLE_GUILD_STASH
  5682. m_ckGuildStashPermission.SetCheck( FALSE );
  5683. #endif
  5684. }
  5685.  
  5686. BOOL CUIGuild::CheckDataValidation()
  5687. {
  5688. CUIManager* pUIManager = CUIManager::getSingleton();
  5689. CUIMsgBox_Info MsgBoxInfo;
  5690. int tInt;
  5691. CTString tStr;
  5692.  
  5693. pUIManager->CloseMessageBox(MSGCMD_NULL);
  5694. MsgBoxInfo.SetMsgBoxInfo( _S(3877, "입력 오류" ), UMBS_OK,
  5695. UI_NONE,MSGCMD_NULL );
  5696.  
  5697. // 직위명 설정 문자 검사
  5698. tStr = m_ebChangePositionName.GetString();
  5699. if( tStr.Length() == 0 )
  5700. {
  5701. MsgBoxInfo.AddString( _S(3878, "입력된 문자가 없습니다.") );
  5702. pUIManager->CreateMessageBox( MsgBoxInfo );
  5703. return FALSE;
  5704.  
  5705. }
  5706. else if (UTIL_HELP()->IsSpecialChar(tStr.str_String) == true)
  5707. {
  5708. MsgBoxInfo.AddString(_S( 437, "문장에 금지된 단어가 포함되어 있습니다."));
  5709. pUIManager->CreateMessageBox( MsgBoxInfo );
  5710. return FALSE;
  5711. }
  5712. else if( _UIFiltering.Filtering ( tStr.str_String ) == TRUE)
  5713. {
  5714. CTString strMessage = _S( 435, "잘못된 문자[" );
  5715. strMessage += tStr.str_String;
  5716. strMessage += _S( 436, "]가 포함되어 있습니다." );
  5717.  
  5718. MsgBoxInfo.AddString( strMessage );
  5719. pUIManager->CreateMessageBox( MsgBoxInfo );
  5720. m_ebChangePositionName.ResetString();
  5721. return FALSE;
  5722. }
  5723.  
  5724. // 상납 설정 검사
  5725. tStr = m_ebChangePayExp.GetString();
  5726. if( !tStr.IsInteger() )
  5727. {
  5728. MsgBoxInfo.AddString( _S(3879, "경험치 입력이 잘못 되었습니다.") );
  5729. pUIManager->CreateMessageBox( MsgBoxInfo );
  5730.  
  5731. return FALSE;
  5732.  
  5733. }
  5734. tInt = atoi(tStr.str_String);
  5735. #if defined (G_USA) || defined(G_GERMAN) || defined(G_EUROPE3) || defined(G_EUROPE2) || defined(G_THAI)
  5736. if ( tInt > 50 || tInt < 0 )
  5737. {
  5738. MsgBoxInfo.AddString( _S(2274, "[0~50]사이 숫자를 입력해 주세요.") );
  5739.  
  5740. pUIManager->CreateMessageBox( MsgBoxInfo );
  5741.  
  5742. return FALSE;
  5743. }
  5744. #else
  5745. if( tInt > 100 || tInt < 0 )
  5746. {
  5747. MsgBoxInfo.AddString( _S(3880, "[0~100]사이 숫자를 입력해 주세요.") );
  5748.  
  5749. pUIManager->CreateMessageBox( MsgBoxInfo );
  5750.  
  5751. return FALSE;
  5752. }
  5753. #endif
  5754.  
  5755. #if defined (G_RUSSIA)
  5756. if( tInt > 80 || tInt < 0 )
  5757. {
  5758. MsgBoxInfo.AddString( _S(4729, "[0~80]사이 숫자를 입력해 주세요.") );
  5759.  
  5760. pUIManager->CreateMessageBox( MsgBoxInfo );
  5761.  
  5762. return FALSE;
  5763. }
  5764. #endif
  5765. tStr = m_ebChangePayFame.GetString();
  5766. if( !tStr.IsInteger() )
  5767. {
  5768. MsgBoxInfo.AddString( _S(3881, "명성치 입력이 잘못 되었습니다.") );
  5769. pUIManager->CreateMessageBox( MsgBoxInfo );
  5770. return FALSE;
  5771.  
  5772. }
  5773. tInt = atoi(tStr.str_String);
  5774. if( tInt > 100 )
  5775. {
  5776. MsgBoxInfo.AddString( _S(3880, "[0~100]사이 숫자를 입력해 주세요.") );
  5777. pUIManager->CreateMessageBox( MsgBoxInfo );
  5778.  
  5779. return FALSE;
  5780. }
  5781.  
  5782. if ( m_cmbCorps.GetCurSel() < 0 )
  5783. {
  5784. MsgBoxInfo.AddString( _S( 5331, "부 선택이 잘못 되었습니다.") );
  5785. pUIManager->CreateMessageBox( MsgBoxInfo );
  5786. return FALSE;
  5787. }
  5788. return TRUE;
  5789. }
  5790.  
  5791. // Message Send -------------------->><<
  5792. // 길드 정보 요청
  5793. void CUIGuild::SendRequestGuildTab(int iTabNum)
  5794. {
  5795. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5796.  
  5797. switch(iTabNum)
  5798. {
  5799. case NEW_GUILD_INFO :
  5800. nmGuild << (UBYTE)MSG_NEW_GUILD_INFO;
  5801. break;
  5802. case NEW_GUILD_MEMBER_INFO :
  5803. {
  5804. m_lbGuildMemberList.ResetAllStrings();
  5805. m_lbGuildMemberList.Reset();
  5806. m_ContGuild.clear();
  5807. ResetArrangeState();
  5808. m_iOnlineMembers =0;
  5809.  
  5810. nmGuild << (UBYTE)MSG_NEW_GUILD_MEMBERLIST;
  5811. }
  5812. break;
  5813. case NEW_GUILD_SKILL :
  5814. nmGuild << (UBYTE)MSG_NEW_GUILD_SKILL;
  5815. break;
  5816. #ifndef LOCAL_NEW_GUILD // 해외 로컬 웹보드사용 안함
  5817. case NEW_GUILD_BOARD :
  5818. // TODO :: 길드 게시판
  5819. break;
  5820. #endif
  5821. case NEW_GUILD_NOTICE :
  5822. nmGuild << (UBYTE)MSG_NEW_GUILD_NOTICE;
  5823. break;
  5824. case NEW_GUILD_MANAGE :
  5825. {
  5826. // Member List Init
  5827. m_lbManageMemberList.ResetAllStrings();
  5828. m_vManageMemberIndex.clear();
  5829. ClearMemberList();
  5830.  
  5831. nmGuild << (UBYTE)MSG_NEW_GUILD_MANAGE;
  5832. }
  5833. break;
  5834. }
  5835. _pNetwork->SendToServerNew(nmGuild);
  5836.  
  5837. }
  5838.  
  5839. // 길드 성향 변경
  5840. void CUIGuild::SendChangeGuildInclination(UBYTE ubIncline)
  5841. {
  5842. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5843. nmGuild << (UBYTE)MSG_NEW_GUILD_INCLINE_ESTABLISH << ubIncline;
  5844. _pNetwork->SendToServerNew(nmGuild);
  5845. }
  5846.  
  5847. // 길드 정보 수정
  5848. void CUIGuild::SendAdjustGuildMemberInfo(int charIdx, CTString posName ,int expPer, int famePer, int corps /* = -1 */, UBYTE ubStashAuth /* = 0 */)
  5849. {
  5850. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5851. nmGuild << (UBYTE)MSG_NEW_GUILD_MEMBER_ADJUST
  5852. << (ULONG)charIdx
  5853. << posName
  5854. << (ULONG)expPer
  5855. << (ULONG)famePer;
  5856. nmGuild << (INDEX)corps;
  5857. #ifdef ENABLE_GUILD_STASH
  5858. nmGuild << (UBYTE)ubStashAuth;
  5859. #endif
  5860. _pNetwork->SendToServerNew(nmGuild);
  5861. }
  5862.  
  5863. // 길드 공지 업데이트(길드장)
  5864. void CUIGuild::SendUpdateGuildNotice( CTString strTitle, CTString strContents)
  5865. {
  5866. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5867. EncodeNoticeString(strContents);
  5868. nmGuild << (UBYTE)MSG_NEW_GUILD_NOTICE_UPDATE
  5869. << strTitle
  5870. << strContents;
  5871.  
  5872. _pNetwork->SendToServerNew(nmGuild);
  5873. }
  5874.  
  5875. // 길드장 공지 요청
  5876. void CUIGuild::SendRequestGuildNotice()
  5877. {
  5878. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5879. nmGuild << (UBYTE)MSG_NEW_GUILD_NOTICE_REQUEST;
  5880. _pNetwork->SendToServerNew(nmGuild);
  5881.  
  5882. }
  5883.  
  5884. // 길드 스킬 습득하기
  5885. void CUIGuild::SendLearnGuildSkill(int skillIdx)
  5886. {
  5887. CNetworkMessage nmGuild((UBYTE)MSG_GUILD);
  5888. nmGuild << (UBYTE)MSG_NEW_GUILD_SKILL_LEARN;
  5889. nmGuild << (ULONG)skillIdx;
  5890. _pNetwork->SendToServerNew(nmGuild);
  5891. }
  5892.  
  5893. // Message Receive----------------->><<
  5894. void CUIGuild::ReceiveNewGuildMessage(UBYTE ubType,CNetworkMessage* istr)
  5895. {
  5896. CUIManager* pUIManager = CUIManager::getSingleton();
  5897.  
  5898. switch(ubType)
  5899. {
  5900. case MSG_NEW_GUILD_INCLINE_ESTABLISH:
  5901. // TODO : 길드 성향 처리
  5902. break;
  5903. case MSG_NEW_GUILD_INFO:
  5904. {
  5905. ULONG GuildLevel;
  5906. ULONG NumOfMember;
  5907. ULONG NumOfMaxMember;
  5908. ULONG GuildAverageLevel;
  5909. ULONG GuildTotalPoint;
  5910. ULONG GuildMyPoint;
  5911.  
  5912. (*istr) >> m_strGuildName
  5913. >> GuildLevel
  5914. >> m_strBossName
  5915. >> NumOfMember
  5916. >> NumOfMaxMember
  5917. >> GuildAverageLevel
  5918. >> GuildTotalPoint
  5919. >> GuildMyPoint;
  5920. m_iGuildLevel = (int)GuildLevel;
  5921. m_iNumOfMember = (int)NumOfMember;
  5922. m_iNumOfMaxMember = (int)NumOfMaxMember;
  5923. m_iGuildAverageLevel = (int)GuildAverageLevel;
  5924. m_iGuildTotalPoint = (int)GuildTotalPoint;
  5925. m_iGuildMyPoint = (int)GuildMyPoint;
  5926. _pNetwork->MyCharacterInfo.iGP = GuildTotalPoint;
  5927.  
  5928. // [sora] GUILD_MARK
  5929. #ifdef GUILD_MARK
  5930. SBYTE gm_row, gm_col, bg_row, bg_col;
  5931. LONG guildMarkTime;
  5932.  
  5933. (*istr) >> gm_row;
  5934. (*istr) >> gm_col;
  5935. (*istr) >> bg_row;
  5936. (*istr) >> bg_col;
  5937. (*istr) >> guildMarkTime;
  5938.  
  5939.  
  5940. // todo 길드 마크 설정 추가
  5941. MY_INFO()->_guildmark.setData(gm_row, gm_col, bg_row, bg_col);
  5942. UIMGR()->SetGuildMark();
  5943. m_pIconGuildMark->CalcUV(gm_row, gm_col, true);
  5944. m_pIconGuildMark->CalcUV(bg_row, bg_col, false);
  5945. m_guildMarkTime = guildMarkTime;
  5946.  
  5947. if( m_guildMarkTime >= 0 )
  5948. {
  5949. time_t tv_used = m_guildMarkTime;
  5950.  
  5951. tm* g_tv_t = localtime((time_t*)&tv_used);
  5952.  
  5953. m_strGuildMarkTime.PrintF( _S( 6070,"만료 : %d년%d월%d일%d시%d분"),g_tv_t->tm_year + 1900
  5954. ,g_tv_t->tm_mon + 1,g_tv_t->tm_mday,g_tv_t->tm_hour, g_tv_t->tm_min);
  5955. }
  5956. else
  5957. {
  5958. m_strGuildMarkTime = _s("");
  5959. }
  5960. #endif
  5961. }
  5962. break;
  5963. case MSG_NEW_GUILD_MEMBERLIST:
  5964. {
  5965. int i;
  5966. CTString tPosName;
  5967. CTString strMemName;
  5968. ULONG ulListCnt;
  5969. ULONG charLevel;
  5970. LONG zoneIndex;
  5971. ULONG cumulPoint;
  5972. UBYTE iJob;
  5973. UBYTE iJob2;
  5974. UBYTE bPlaying;
  5975. ULONG ulPosition; // 캐릭터 직위(BOSS,VICEBOSS.MEMBER)
  5976.  
  5977. //m_lbGuildMemberList.ResetAllStrings();
  5978. //m_iOnlineMembers =0;
  5979.  
  5980. (*istr) >> ulListCnt;
  5981. for(i=0; i<ulListCnt; i++)
  5982. {
  5983. clsGuildMemberNew* tGuildMemberNew = new clsGuildMemberNew;
  5984. (*istr) >> strMemName
  5985. >> tPosName
  5986. >> charLevel
  5987. >> bPlaying
  5988. >> zoneIndex
  5989. >> cumulPoint
  5990. >> iJob
  5991. >> iJob2
  5992. >> ulPosition;
  5993.  
  5994. if(bPlaying)
  5995. m_iOnlineMembers++;
  5996.  
  5997. tGuildMemberNew->strMemberName = strMemName.str_String;
  5998. tGuildMemberNew->sPosName = ResetPosName(tPosName,(INT)ulPosition).str_String;
  5999. tGuildMemberNew->iLevel = (INT)charLevel;
  6000. tGuildMemberNew->bOnline = (BOOL)bPlaying;
  6001. tGuildMemberNew->iLocation = (INT)zoneIndex;
  6002. tGuildMemberNew->iCumulPoint = (INT)cumulPoint;
  6003. tGuildMemberNew->iJob = (INT)iJob;
  6004. tGuildMemberNew->iJob2 = (INT)iJob2;
  6005. tGuildMemberNew->eRanking = (INT)ulPosition;
  6006.  
  6007. if (ulPosition == GUILD_MEMBER_MEMBER)
  6008. tGuildMemberNew->nArrangeRank = MSG_GUILD_POSITION_UNKNOWN - 1;
  6009. else
  6010. tGuildMemberNew->nArrangeRank = (int)ulPosition;
  6011.  
  6012. // TODO :: 제대로 받는 확인... iJob이 비트로 설정할때도 있어서...
  6013. tGuildMemberNew->sJobName = CJobInfo::getSingleton()->GetName(iJob,iJob2);
  6014. //if((int)zoneIndex == -1 )
  6015. // tGuildMemberNew->sLocName = _S(3978, "비접속");
  6016. if ((int)zoneIndex >= 0)
  6017. tGuildMemberNew->sLocName = CZoneInfo::getSingleton()->GetZoneName( zoneIndex );
  6018.  
  6019. m_ContGuild.insert(clsGuildMemberNew::SP(tGuildMemberNew));
  6020.  
  6021. AddGuildMemberInfo(*tGuildMemberNew);
  6022. }
  6023. INDEX iCorpsMember, iCorpsBoss;
  6024. (*istr) >> iCorpsMember
  6025. >> iCorpsBoss;
  6026. SetCorpsInfo( iCorpsMember, iCorpsBoss );
  6027. }
  6028. break;
  6029. case MSG_NEW_GUILD_SKILL:
  6030. // TODO :: 이후 스킬툴에 추가 후 작업
  6031. // skillcount(n) skillindex(n) skillLeanLevel(n) skillMaxLevel(n)
  6032. {
  6033. ReceiveGuildSkillExtend(istr);
  6034. }
  6035. break;
  6036. case MSG_NEW_GUILD_NOTICE:
  6037. {
  6038. m_iSelTab = NEW_GUILD_NOTICE;
  6039. CTString tStr;
  6040. (*istr) >> tStr;
  6041. m_ebNoticeTitle.SetString(tStr.str_String);
  6042. (*istr) >> tStr;
  6043. DecodeNoticeString(tStr);
  6044. m_mebNoticeContent.SetString(tStr.str_String);
  6045. }
  6046. break;
  6047. case MSG_NEW_GUILD_NOTICE_TRANSMISSION:
  6048. {
  6049. CTString tStr,tStr2;
  6050. (*istr) >> m_strGuildName;
  6051. (*istr) >> tStr;
  6052. (*istr) >> tStr2;
  6053. DecodeNoticeString(tStr2);
  6054. pUIManager->GetGuildNotice()->SetGuildNotice(m_strGuildName,tStr,tStr2);
  6055. pUIManager->RearrangeOrder( UI_GUILD_NOTICE, TRUE );
  6056. }
  6057. break;
  6058. case MSG_NEW_GUILD_MANAGE:
  6059. {
  6060. clsGuildMemberNew tMemberInfo;
  6061. BYTE bFirstListMember;
  6062. INDEX tLoop;
  6063. ULONG eRanking;
  6064. ULONG iLevel;
  6065. ULONG iExpServ;
  6066. ULONG iFameServ;
  6067. ULONG icharIdx;
  6068. BYTE bStashPermission = 0;
  6069. CTString strMemName;
  6070. CTString strPosName;
  6071. (*istr) >> bFirstListMember;
  6072. (*istr) >> tLoop;
  6073.  
  6074. if (bFirstListMember > 0)
  6075. {
  6076. // Member List Init
  6077. m_lbManageMemberList.ResetAllStrings();
  6078. m_vManageMemberIndex.clear();
  6079. ClearMemberList();
  6080. }
  6081.  
  6082. for(int i=0;i<tLoop;i++)
  6083. {
  6084. (*istr) >> eRanking
  6085. >> strMemName
  6086. >> strPosName
  6087. >> iLevel
  6088. >> iExpServ
  6089. >> iFameServ
  6090. >> icharIdx
  6091. #ifdef ENABLE_GUILD_STASH
  6092. >> bStashPermission
  6093. #endif
  6094. ;
  6095. tMemberInfo.strMemberName = strMemName.str_String;
  6096. tMemberInfo.sPosName = strPosName.str_String;
  6097. tMemberInfo.eRanking = eRanking;
  6098. tMemberInfo.iLevel = iLevel;
  6099. tMemberInfo.iExpServ = iExpServ;
  6100. tMemberInfo.iFameServ = iFameServ;
  6101. #ifdef ENABLE_GUILD_STASH
  6102. tMemberInfo.bStashPermission = bStashPermission;
  6103. #endif
  6104. tMemberInfo.sRanking = ResetPosName( CTString(""), eRanking );
  6105. tMemberInfo.sPosName = ResetPosName( CTString(tMemberInfo.sPosName.c_str()), eRanking );
  6106.  
  6107. m_vManageMemberIndex.push_back(icharIdx);
  6108. AddGuildManageInfo(tMemberInfo);
  6109. // 길드장 이임,임명,해임,퇴출등 기존 루틴을 사용하기 위해
  6110. AddToMemberList(icharIdx,CTString(tMemberInfo.strMemberName.c_str()),eRanking,FALSE);
  6111. }
  6112. INDEX iCorpsMember, iCorpsBoss;
  6113. (*istr) >> iCorpsMember
  6114. >> iCorpsBoss;
  6115. SetCorpsInfo( iCorpsMember, iCorpsBoss );
  6116. }
  6117. break;
  6118.  
  6119. case MSG_NEW_GUILD_POINT_RANKING:
  6120. {
  6121. ULONG charindex;
  6122. ULONG guildindex;
  6123. ULONG rankingv;
  6124. (*istr) >> charindex
  6125. >> guildindex
  6126. >> rankingv;
  6127. #if defined (G_MAL)
  6128. break;
  6129. #endif
  6130. if( charindex == _pNetwork->MyCharacterInfo.index)
  6131. {
  6132. if( _pNetwork->MyCharacterInfo.lGuildIndex == guildindex )
  6133. _pNetwork->MyCharacterInfo.sbGuildRank = rankingv;
  6134. }
  6135. else
  6136. {
  6137. ObjectBase* pObject = ACTORMGR()->GetObject(eOBJ_CHARACTER, charindex);
  6138.  
  6139. if (pObject != NULL)
  6140. {
  6141. CCharacterTarget* pTarget = static_cast< CCharacterTarget* >(pObject);
  6142.  
  6143. if (pTarget->cha_lGuildIndex == guildindex)
  6144. {
  6145. pTarget->cha_sbGuildRank = rankingv;
  6146. }
  6147. }
  6148. }
  6149. }
  6150. break;
  6151. case MSG_GUILD_GP_INFO:
  6152. {
  6153. INDEX iGP;
  6154. (*istr) >> iGP;
  6155.  
  6156. _pNetwork->MyCharacterInfo.iGP = iGP;
  6157. m_iGuildTotalPoint = iGP;
  6158. }
  6159. break;
  6160. // [2010/11/01 : Sora] 공성 개편
  6161. case MSG_GUILD_WAR_SET_TIME_MENU:
  6162. {
  6163. UBYTE count, zone, wday, hour;
  6164. CUISiegeWarfare::stSiegeWarfareTimeInfo swInfo;
  6165.  
  6166. pUIManager->GetSiegeWarfare()->InitSiegeWarfareTimeInfo();
  6167.  
  6168. (*istr) >> count;
  6169. for( int i=0; i<count; ++i )
  6170. {
  6171. (*istr) >> zone;
  6172. (*istr) >> wday;
  6173. (*istr) >> hour;
  6174.  
  6175. swInfo.zone = zone;
  6176. swInfo.wday = wday;
  6177. swInfo.hour = hour;
  6178.  
  6179. pUIManager->GetSiegeWarfare()->SetSiegeWarfareTimeInfo( swInfo );
  6180. }
  6181.  
  6182. pUIManager->GetSiegeWarfare()->OpenSetSWTime();
  6183. }
  6184. break;
  6185. case MSG_GUILD_WAR_GET_TIME_UNI_REP:
  6186. {
  6187. SBYTE count, zone, month, day, hour, joinFlag, info;
  6188. CTString guildName, guildBossName;
  6189.  
  6190. pUIManager->GetSiegeWarfareInfo()->InitSiegeWarfareInfo();
  6191.  
  6192. (*istr) >> count;
  6193.  
  6194. CUISiegeWarfareInfo::stSiegeWarfareDefGuildInfo defGuildInfo;
  6195. for( int i=0; i<count; ++i )
  6196. {
  6197. defGuildInfo.Init();
  6198.  
  6199. (*istr) >> zone;
  6200. (*istr) >> guildName;
  6201. (*istr) >> month;
  6202. (*istr) >> day;
  6203. (*istr) >> hour;
  6204.  
  6205. defGuildInfo.zone = zone;
  6206. defGuildInfo.guildName = guildName;
  6207. defGuildInfo.month = month;
  6208. defGuildInfo.day = day;
  6209. defGuildInfo.hour = hour;
  6210.  
  6211. pUIManager->GetSiegeWarfareInfo()->SetSiegeWarfareDefGuildInfo( defGuildInfo );
  6212. }
  6213.  
  6214. (*istr) >> info;
  6215.  
  6216. if( info > 0 )
  6217. {
  6218. (*istr) >> guildName;
  6219. (*istr) >> guildBossName;
  6220.  
  6221. pUIManager->GetSiegeWarfareInfo()->SetMySiegeWarfareGuildInfo( guildName, guildBossName );
  6222.  
  6223. (*istr) >> count;
  6224.  
  6225. for( int i = 0; i < count; ++i )
  6226. {
  6227. (*istr) >> joinFlag;
  6228. (*istr) >> zone;
  6229.  
  6230. if( zone >= 0 )
  6231. {
  6232. pUIManager->GetSiegeWarfareInfo()->SetMySiegeWarfareJoinInfo( zone, joinFlag );
  6233. }
  6234. }
  6235. }
  6236.  
  6237. pUIManager->GetSiegeWarfareInfo()->ToggleSiegeWarfareInfo(TRUE);
  6238. }
  6239. break;
  6240. case MSG_NEW_GUILD_MARK_EDIT_FIN:
  6241. {
  6242. pUIManager->GetChattingUI()->AddSysMessage( _S( 5511, "길드 마크를 등록하였습니다.") );
  6243.  
  6244. SBYTE gm_row, gm_col, bg_row, bg_col;
  6245. LONG guildMarkTime;
  6246.  
  6247. (*istr) >> gm_row;
  6248. (*istr) >> gm_col;
  6249. (*istr) >> bg_row;
  6250. (*istr) >> bg_col;
  6251. (*istr) >> guildMarkTime;
  6252.  
  6253. MY_INFO()->_guildmark.setData(gm_row, gm_col, bg_row, bg_col);
  6254. UIMGR()->SetGuildMark();
  6255. m_pIconGuildMark->CalcUV(gm_row, gm_col, true);
  6256. m_pIconGuildMark->CalcUV(bg_row, bg_col, false);
  6257. m_guildMarkTime = guildMarkTime;
  6258.  
  6259. if( m_guildMarkTime >= 0 )
  6260. {
  6261. time_t tv_used = m_guildMarkTime;
  6262.  
  6263. tm* g_tv_t = localtime((time_t*)&tv_used);
  6264.  
  6265. m_strGuildMarkTime.PrintF( _S( 6070,"만료 : %d년%d월%d일%d시%d분"),g_tv_t->tm_year + 1900
  6266. ,g_tv_t->tm_mon + 1,g_tv_t->tm_mday,g_tv_t->tm_hour, g_tv_t->tm_min);
  6267. }
  6268. else
  6269. {
  6270. m_strGuildMarkTime = _s("");
  6271. }
  6272. }
  6273. break;
  6274. case MSG_NEW_GUILD_MARK_EXPIRE:
  6275. {
  6276. pUIManager->GetChattingUI()->AddSysMessage( _S( 5512, "길드 마크의 등록 기간이 만료되었습니다.") );
  6277.  
  6278. MY_INFO()->_guildmark.remove();
  6279. pUIManager->GetGuildMark()->InitGuidMark();
  6280. }
  6281. break;
  6282. }
  6283. }
  6284.  
  6285.  
  6286. void CUIGuild::UpdateGuildSkillLearnMessage(UpdateClient::doNewGuildSkillLearnToMemberMsg& SkillInfo)
  6287. {
  6288. CTString tStr;
  6289.  
  6290. MY_INFO()->SetSkill(SkillInfo.skill_index, SkillInfo.skill_level);
  6291.  
  6292. if ( SkillInfo.skill_type == GUILD_SKILL_ACTIVE)
  6293. {
  6294. INDEX tCnt = m_vecGuildActiveSkill.size();
  6295. tStr.PrintF("%d",tCnt);
  6296.  
  6297. for(int i = 0; i < tCnt; i++)
  6298. {
  6299. if( m_vecGuildActiveSkill[i].GetIndex() == SkillInfo.skill_index)
  6300. {
  6301. m_vecGuildActiveSkill[i].SetCurLevel((int)SkillInfo.skill_level);
  6302. break;
  6303. }
  6304. }
  6305. }
  6306. else if ( SkillInfo.skill_type == GUILD_SKILL_PASSIVE )
  6307. {
  6308. INDEX tCnt = m_vecGuildPassiveSkill.size();
  6309. tStr.PrintF("%d",tCnt);
  6310.  
  6311. for(int i = 0; i < tCnt; i++)
  6312. {
  6313. if( m_vecGuildPassiveSkill[i].GetIndex() == SkillInfo.skill_index)
  6314. {
  6315. m_vecGuildPassiveSkill[i].SetCurLevel((int)SkillInfo.skill_level);
  6316. break;
  6317. }
  6318. }
  6319. }
  6320. else
  6321. {
  6322. return;
  6323. }
  6324.  
  6325. SetSkillBtnInfo();
  6326. SetGuildSkillInfo();
  6327. }
  6328.  
  6329. // 길드 멤버 정보 리스트 추가
  6330. void CUIGuild::AddGuildMemberInfo(clsGuildMemberNew tMemberInfo)
  6331. {
  6332. CTString tPer;
  6333. CTString strTemp;
  6334. m_lbGuildMemberList.ChangeCurrentState(CUIListBoxEx::PS_NONE);
  6335. m_lbGuildMemberList.AddString(0,CTString(" "));
  6336. m_lbGuildMemberList.SetImageBox(m_lbGuildMemberList.GetCurItemCount(0)-1, CUIImageBox::IT_CORPS, tMemberInfo.eRanking, TRUE, ResetPosName(CTString(""), tMemberInfo.eRanking) );
  6337. m_lbGuildMemberList.AddString(1,CTString(tMemberInfo.strMemberName.c_str()));
  6338. m_lbGuildMemberList.AddString(2,CTString(tMemberInfo.sPosName.c_str()));
  6339.  
  6340. //자기 정보면 직위명추가
  6341. strTemp = tMemberInfo.strMemberName.c_str();
  6342. if(strTemp.Matches(_pNetwork->MyCharacterInfo.name))
  6343. {
  6344. _pNetwork->MyCharacterInfo.guildPosName = tMemberInfo.sPosName.c_str();
  6345. }
  6346.  
  6347. tPer.PrintF("%d",tMemberInfo.iLevel);
  6348. m_lbGuildMemberList.AddString(3,tPer);
  6349. tPer.PrintF("%s",tMemberInfo.sJobName.c_str());
  6350. m_lbGuildMemberList.AddString(4,tPer);
  6351.  
  6352. if (tMemberInfo.iLocation >= 0)
  6353. tPer.PrintF("%s",tMemberInfo.sLocName.c_str());
  6354. else
  6355. tPer = _S(3978, "비접속");
  6356.  
  6357. m_lbGuildMemberList.AddString(5,tPer);
  6358. if(m_iGuildTotalPoint>0)
  6359. tPer.PrintF("%d%",(tMemberInfo.iCumulPoint*100)/m_iGuildTotalPoint);
  6360. else
  6361. tPer.PrintF("0");
  6362. m_lbGuildMemberList.AddString(6,tPer);
  6363. tPer.PrintF("%d",tMemberInfo.iCumulPoint);
  6364. m_lbGuildMemberList.AddString(7,tPer);
  6365. }
  6366.  
  6367. // 길드 멤버 정보 리스트 추가
  6368. void CUIGuild::AddGuildManageInfo(clsGuildMemberNew tMemberInfo)
  6369. {
  6370. //자기 정보면 직위명추가
  6371. CTString strTemp = tMemberInfo.strMemberName.c_str();
  6372. if(strTemp.Matches(_pNetwork->MyCharacterInfo.name))
  6373. {
  6374. _pNetwork->MyCharacterInfo.guildPosName = tMemberInfo.sPosName.c_str();
  6375. }
  6376. CTString tPer;
  6377. tPer.PrintF("%s",tMemberInfo.sRanking.c_str());
  6378. m_lbManageMemberList.AddString(0,tPer);
  6379. m_lbManageMemberList.AddString(1,SetPosName(tMemberInfo.sPosName.c_str()));
  6380. tPer.PrintF("%d",tMemberInfo.iLevel);
  6381. m_lbManageMemberList.AddString(2,tPer);
  6382. m_lbManageMemberList.AddString(3,CTString(tMemberInfo.strMemberName.c_str()));
  6383. tPer.PrintF("%d%%",tMemberInfo.iExpServ);
  6384. m_lbManageMemberList.AddString(4,tPer);
  6385. tPer.PrintF("%d%%",tMemberInfo.iFameServ);
  6386. m_lbManageMemberList.AddString(5,tPer);
  6387. #ifdef ENABLE_GUILD_STASH
  6388. m_lbManageMemberList.AddString(6,tMemberInfo.bStashPermission>0?_S(5560, "가능") : _S(5561, "불가") );
  6389. #endif
  6390. }
  6391.  
  6392. // ----------------------------------------------------------------------------
  6393. // Name : OpenGuildManagerNew()
  6394. // Desc :
  6395. // ----------------------------------------------------------------------------
  6396. void CUIGuild::OpenGuildManagerNew()
  6397. {
  6398. if (IsVisible()) return;
  6399.  
  6400. m_iGuildLevel = _pNetwork->MyCharacterInfo.lGuildLevel;
  6401.  
  6402. // 레벨이 6이하면 출력하지 않는다...
  6403. if( m_iGuildLevel < LIMIT_GUILD_LEVEL )
  6404. {
  6405. return;
  6406. }
  6407.  
  6408. CUIManager* pUIManager = CUIManager::getSingleton();
  6409.  
  6410. // 웹게시판 연결
  6411. m_pWebBoard = pUIManager->GetWebBoard();
  6412.  
  6413. // 초기화
  6414. InitNewGuildSystem();
  6415.  
  6416. // 길드 스킬 리스트.
  6417. SetGuildSkillList();
  6418. m_sbGuildSkillBar.SetCurItemCount(m_vecGuildPassiveSkill.size());
  6419.  
  6420. // 길드 정보 요청
  6421. SendRequestGuildTab(0);
  6422.  
  6423. // 사이즈및 위치 설정
  6424. SetSize( NEW_GUILD_SYSTEM_WIDTH, NEW_GUILD_SYSTEM_HEIGHT );
  6425. extern ENGINE_API CDrawPort *_pdpMain;
  6426. ResetPosition(_pdpMain->dp_MinI,_pdpMain->dp_MinJ,_pdpMain->dp_MaxI,_pdpMain->dp_MaxJ);
  6427.  
  6428. m_eGuildState = GUILD_MANAGER_NEW;
  6429.  
  6430. pUIManager->RearrangeOrder( UI_GUILD, TRUE );
  6431.  
  6432. }
  6433.  
  6434. void CUIGuild::EncodeNoticeString(CTString& tStr)
  6435. {
  6436. while(tStr.ReplaceSubstr("\r\n","``"));
  6437. }
  6438.  
  6439. void CUIGuild::DecodeNoticeString(CTString& tStr)
  6440. {
  6441. while(tStr.ReplaceSubstr("``","\r\n"));
  6442. }
  6443.  
  6444. void CUIGuild::AdjustGuildMemberInfo()
  6445. {
  6446. INDEX tRow = m_lbManageMemberList.GetCurSel();
  6447. CTString strCorps = ResetPosName( CTString(""), GetSelectedPositon() );
  6448. m_lbManageMemberList.SetString(0,tRow, strCorps);
  6449. m_vectorMemberList[tRow].eRanking = GetSelectedPositon();
  6450. m_lbManageMemberList.SetString(1,tRow,CTString(m_ebChangePositionName.GetString()));
  6451. CTString strTmp;
  6452. strTmp.PrintF("%s%%",CTString(m_ebChangePayExp.GetString()));
  6453. m_lbManageMemberList.SetString(4,tRow,strTmp);
  6454. strTmp.PrintF("%s%%",CTString(m_ebChangePayFame.GetString()));
  6455. m_lbManageMemberList.SetString(5,tRow,strTmp);
  6456. #ifdef ENABLE_GUILD_STASH
  6457. m_lbManageMemberList.SetString(6,tRow, m_ckGuildStashPermission.IsChecked() ? _S(5560, "가능") : _S(5561, "불가") );
  6458. #endif
  6459. }
  6460.  
  6461. void CUIGuild::SetGuildSkillList()
  6462. {
  6463. // Set Skill List
  6464. if( m_vecGuildPassiveSkill.size() > 0 )
  6465. return;
  6466.  
  6467. INDEX tCnt = _pNetwork->ga_World.wo_aSkillData.Count();
  6468. INDEX tCnt2 = 0;
  6469. INDEX tCnt3 = 0;
  6470. INDEX tLoop = 0;
  6471.  
  6472. // Check Guild Skill Count
  6473. for( tLoop=0;tLoop<=tCnt;tLoop++)
  6474. {
  6475. CSkill &rSkillData = _pNetwork->GetSkillData(tLoop);
  6476. if( rSkillData.GetType() == CSkill::ST_GUILD_SKILL_PASSIVE || ( rSkillData.GetFlag()&SF_GUILD && rSkillData.GetType() == CSkill::ST_PASSIVE ) )
  6477. {
  6478. m_vecGuildPassiveSkill.push_back(rSkillData);
  6479. tCnt2++;
  6480. }
  6481. else if ( rSkillData.GetFlag()&SF_GUILD && ( rSkillData.GetType() != CSkill::ST_GUILD_SKILL_PASSIVE || rSkillData.GetType() != CSkill::ST_PASSIVE ) )
  6482. {
  6483. m_vecGuildActiveSkill.push_back(rSkillData);
  6484. tCnt3++;
  6485. }
  6486. }
  6487. }
  6488.  
  6489. void CUIGuild::GetBoardListContent()
  6490. {
  6491. if(m_lbListContent.GetCurItemCount(0)>0)
  6492. {
  6493. if( m_lbListContent.GetString(0,0) == pWEB->m_lbListContent.GetString(0,0) ) return;
  6494. }
  6495.  
  6496. int tColCnt = pWEB->m_lbListContent.GetColumnCount();
  6497. int tItemCnt = pWEB->m_lbListContent.GetCurItemCount(0);
  6498. m_lbListContent.ResetAllStrings();
  6499. for(int j=0;j<tItemCnt;j++)
  6500. {
  6501. for(int i=0;i<tColCnt;i++)
  6502. {
  6503. m_lbListContent.AddString(i,pWEB->m_lbListContent.GetString(i,j));
  6504. }
  6505. }
  6506. }
  6507.  
  6508. void CUIGuild::GetBoardReadContent()
  6509. {
  6510. if(m_lbReadContent.GetCurItemCount(0)>0)
  6511. {
  6512. if( m_lbReadContent.GetString(0,0) == pWEB->m_lbReadContent.GetString(0,0) ) return;
  6513. }
  6514. m_lbReadContent.ResetAllStrings();
  6515. for(int i=0;i<pWEB->m_lbReadContent.GetCurItemCount(0);i++)
  6516. {
  6517. m_lbReadContent.AddString(0,pWEB->m_lbReadContent.GetString(0,i));
  6518. }
  6519.  
  6520. }
  6521.  
  6522. int CUIGuild::GetGuildSkillLevel(int skillIdx)
  6523. {
  6524. CSkill& SkillData = _pNetwork->GetSkillData( skillIdx );
  6525. if( SkillData.GetType() == CSkill::ST_GUILD_SKILL_PASSIVE || ( SkillData.GetFlag()&SF_GUILD && SkillData.GetType() == CSkill::ST_PASSIVE ) )
  6526. {
  6527. for(int i=0;i<m_vecGuildPassiveSkill.size();i++)
  6528. {
  6529. if(m_vecGuildPassiveSkill[i].GetIndex() == skillIdx)
  6530. {
  6531. return m_vecGuildPassiveSkill[i].GetCurLevel();
  6532. }
  6533. }
  6534. }
  6535. else if ( SkillData.GetFlag()&SF_GUILD && ( SkillData.GetType() != CSkill::ST_GUILD_SKILL_PASSIVE || SkillData.GetType() != CSkill::ST_PASSIVE ) )
  6536. {
  6537. for (int i=0 ; i<m_vecGuildActiveSkill.size(); ++i)
  6538. {
  6539. if ( m_vecGuildActiveSkill[i].GetIndex() == skillIdx )
  6540. {
  6541. return m_vecGuildActiveSkill[i].GetCurLevel();
  6542. }
  6543. }
  6544. }
  6545. return 0;
  6546. }
  6547.  
  6548. CTString CUIGuild::SetPosName(CTString tName)
  6549. {
  6550. if( tName.Length() )
  6551. {
  6552. return tName;
  6553. }
  6554. else
  6555. {
  6556. // TODO : 지정된 이름이 없으면 디폴트 직위명을 붙여 준다.
  6557. return tName;
  6558. }
  6559.  
  6560. }
  6561.  
  6562. void CUIGuild::ResetGuildMaxMember(int guildSkillLevel)
  6563. {
  6564. // WSS_NEW_GUILD_SYSTEM 070704
  6565. for(int i= 7;i<MAX_GUILD_LEVEL;i++)
  6566. {
  6567. // 필요나스/sp/gp = 7레벨업시 필요량 * (1.09^(길드LV - 7))
  6568. if (guildSkillLevel < 6)
  6569. {// 길드 스킬 레벨이 6레벨 미만이면 +5씩 최대 멤버 증가
  6570. _GuildConditionTable[i].iMaxMember = _GuildConditionTable[6].iMaxMember + 5*guildSkillLevel;
  6571. }
  6572. else
  6573. {// 길드 스킬 레벨이 6레벨 이상이면 +9씩 최대 멤버 증가
  6574. const int tmpGuildMember = 55;
  6575. _GuildConditionTable[i].iMaxMember = tmpGuildMember + (9*(guildSkillLevel-5));
  6576. }
  6577. }
  6578. }
  6579.  
  6580. CTString CUIGuild::ResetPosName(CTString tPosName,int ulPosition)
  6581. {
  6582. if( tPosName.Length() == 0 )
  6583. {
  6584. return m_strCorps[ulPosition];
  6585. }
  6586. return tPosName;
  6587. }
  6588.  
  6589. BOOL CUIGuild::IsEditBoxFocused()
  6590. {
  6591. return (m_ebGuildName.IsFocused() ||
  6592. m_ebSearch.IsFocused() ||
  6593. m_cmbSearch.IsFocused() ||
  6594. m_ebWriteSubject.IsFocused() ||
  6595. m_mebContent.IsFocused() ||
  6596. m_ebNoticeTitle.IsFocused() ||
  6597. m_mebNoticeContent.IsFocused() ||
  6598. m_ebChangePositionName.IsFocused() ||
  6599. m_ebChangePayExp.IsFocused() ||
  6600. m_ebChangePayFame.IsFocused() ||
  6601. m_cmbCorps.IsFocused() );
  6602. }
  6603.  
  6604. void CUIGuild::KillFocusEditBox()
  6605. {
  6606. m_ebGuildName.SetFocus( FALSE );
  6607. m_ebSearch.SetFocus( FALSE );
  6608. m_cmbSearch.SetFocus( FALSE );
  6609. m_ebWriteSubject.SetFocus( FALSE );
  6610. m_mebContent.SetFocus( FALSE );
  6611. m_ebNoticeTitle.SetFocus( FALSE );
  6612. m_mebNoticeContent.SetFocus( FALSE );
  6613. m_ebChangePositionName.SetFocus( FALSE );
  6614. m_ebChangePayExp.SetFocus( FALSE );
  6615. m_ebChangePayFame.SetFocus( FALSE );
  6616. m_cmbCorps.SetFocus( FALSE );
  6617. }
  6618.  
  6619. // ----------------------------------------------------------------------------
  6620. // Name : RenderNewGuildSkillExtend()
  6621. // Desc : 길드 스킬 확장창 그리기
  6622. // ----------------------------------------------------------------------------
  6623. void CUIGuild::RenderNewGuildSkillExtend(int nX,int nY)
  6624. {
  6625. int tInc = 33;
  6626. int tCab = 7;
  6627. int nY2 = nY + 70;
  6628.  
  6629. // Box 2 (Black)
  6630. m_bxBox2.SetBoxPos(WRect(nX+36,nY+59,nX+250,nY+277));
  6631. m_bxBox2.Render();
  6632. m_bxBox2.SetBoxPos(WRect(nX+270,nY+59,nX+577,nY+153));
  6633. m_bxBox2.Render();
  6634. m_bxBox2.SetBoxPos(WRect(nX+270,nY+160,nX+419,nY+250));
  6635. m_bxBox2.Render();
  6636. m_bxBox2.SetBoxPos(WRect(nX+427,nY+160,nX+577,nY+250));
  6637. m_bxBox2.Render();
  6638.  
  6639. // Box 1 (Grey)
  6640. m_bxBox1.SetBoxPos(WRect(nX+46,nY2 ,nX+240,(nY2+tInc)));
  6641. m_bxBox1.Render();
  6642. m_bxBox1.SetBoxPos(WRect(nX+47,nY2 ,nX+81,(nY2+tInc)));
  6643. m_bxBox1.Render();
  6644. nY2+=tInc+tCab;
  6645. m_bxBox1.SetBoxPos(WRect(nX+46,nY2,nX+240,(nY2+tInc)));
  6646. m_bxBox1.Render();
  6647. m_bxBox1.SetBoxPos(WRect(nX+47,nY2,nX+81,(nY2+tInc)));
  6648. m_bxBox1.Render();
  6649. nY2+=tInc+tCab;
  6650. m_bxBox1.SetBoxPos(WRect(nX+46,nY2,nX+240,(nY2+tInc)));
  6651. m_bxBox1.Render();
  6652. m_bxBox1.SetBoxPos(WRect(nX+47,nY2,nX+81,(nY2+tInc)));
  6653. m_bxBox1.Render();
  6654. nY2+=tInc+tCab;
  6655. m_bxBox1.SetBoxPos(WRect(nX+46,nY2,nX+240,(nY2+tInc)));
  6656. m_bxBox1.Render();
  6657. m_bxBox1.SetBoxPos(WRect(nX+47,nY2,nX+81,(nY2+tInc)));
  6658. m_bxBox1.Render();
  6659. nY2+=tInc+tCab;
  6660. m_bxBox1.SetBoxPos(WRect(nX+46,nY2,nX+240,(nY2+tInc)));
  6661. m_bxBox1.Render();
  6662. m_bxBox1.SetBoxPos(WRect(nX+47,nY2,nX+81,(nY2+tInc)));
  6663. m_bxBox1.Render();
  6664. m_bxBox1.SetBoxPos(WRect(nX+270,nY+77,nX+577,nY+153));
  6665. m_bxBox1.Render();
  6666.  
  6667. m_bxBox1.SetBoxPos(WRect(nX+270,nY+178,nX+419,nY+250));
  6668. m_bxBox1.Render();
  6669. m_bxBox1.SetBoxPos(WRect(nX+427,nY+178,nX+577,nY+250));
  6670. m_bxBox1.Render();
  6671.  
  6672. CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
  6673.  
  6674. pDrawPort->FlushRenderingQueue();
  6675.  
  6676. // Guild Skill List ----------------------------------------------------->>
  6677. int iListCnt = GetGuildSkillCount();
  6678.  
  6679. // Left Guild Skill List
  6680. int iRowS = m_sbGuildSkillBar.GetScrollPos();
  6681. int iRowE = iRowS + GUILD_SKILL_SLOT_ROW;
  6682. CTString tStr;
  6683. iRowE = (iRowE>iListCnt)? iListCnt:iRowE;
  6684. nY2 = 0;
  6685.  
  6686. int nSkillCnt = GetGuildSkillCount();
  6687. int nLoopCnt = (nSkillCnt > GUILD_SKILL_VIEW_MAX)? GUILD_SKILL_VIEW_MAX : nSkillCnt;
  6688. //SetSkillBtnInfo();
  6689. for ( int i=0; i<nLoopCnt; ++i )
  6690. {
  6691. // Skill Button Render
  6692. m_pIconsGuildSkillEx[i]->Render(pDrawPort);
  6693.  
  6694. // Skill Info Render
  6695. int nNum, tLv, nMaxLevel;
  6696. CTString strSkillName;
  6697. CSkill SkillData;
  6698.  
  6699. nNum = m_sbGuildSkillBar.GetScrollPos() + i;
  6700. if ( m_nSelSkillTab == GUILD_SKILL_PASSIVE )
  6701. {
  6702. SkillData = m_vecGuildPassiveSkill[nNum];
  6703. }
  6704. else
  6705. {
  6706. SkillData = m_vecGuildActiveSkill[nNum];
  6707. }
  6708.  
  6709. tLv = SkillData.GetCurLevel();
  6710. nMaxLevel = SkillData.GetMaxLevel();
  6711. strSkillName = SkillData.GetName();
  6712. tStr.PrintF( "%s Lv%d/Lv%d", strSkillName, tLv, nMaxLevel );
  6713. pDrawPort->PutTextEx( tStr, nX + 91 , nY +nY2+80,C_lYELLOW|CT_AMASK);
  6714. nY2 += GUILD_SKILL_SLOT_OFFSETY;
  6715. }
  6716. if ( m_bIsSelList )
  6717. {
  6718. CTString strName = GetGuildSkill(m_iGuildSkillPos)->GetName();
  6719. pDrawPort->PutTextEx( strName, nX + 277, nY + 63, C_lYELLOW|CT_AMASK);
  6720. }
  6721. pDrawPort->PutTextEx( _S(5026, "사용정보"), nX + 277, nY + 163, C_lYELLOW|CT_AMASK);
  6722. pDrawPort->PutTextEx( _S(5027, "습득정보"), nX + 434, nY + 163, C_lYELLOW|CT_AMASK);
  6723. // Flush Skill Button Rendering Queue
  6724. pDrawPort->FlushBtnRenderingQueue( UBET_SKILL );
  6725.  
  6726. pDrawPort->InitTextureData(m_ptdBaseTexture);
  6727.  
  6728. if(m_bIsSelList)
  6729. {
  6730. m_lbGuildSkillDesc.Render();
  6731. m_lbLearnInfo.Render();
  6732. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE)
  6733. { // 액티브 탭 일때만 사용 정보 표시
  6734. m_lbUseInfo.Render();
  6735. }
  6736. }
  6737. // Button
  6738. if (_pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS)
  6739. {
  6740. m_btnGetSkill.SetEnable(TRUE);
  6741. }
  6742. else
  6743. {
  6744. m_btnGetSkill.SetEnable(FALSE);
  6745. }
  6746.  
  6747. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE)
  6748. {
  6749. CSkill& rSkill = m_vecGuildActiveSkill[m_iGuildSkillPos];
  6750. if( rSkill.GetCurLevel() > 0 &&
  6751. (rSkill.GetTargetType() == CSkill::STT_GUILD_MEMBER_SELF ||
  6752. _pNetwork->MyCharacterInfo.lGuildPosition == GUILD_MEMBER_BOSS))
  6753. {
  6754. m_btnUseSkill.SetEnable(TRUE);
  6755. }
  6756. else
  6757. {
  6758. m_btnUseSkill.SetEnable(FALSE);
  6759. }
  6760. }
  6761. else
  6762. {
  6763. m_btnUseSkill.SetEnable(FALSE);
  6764. }
  6765. m_btnGetSkill.Render();
  6766. m_btnUseSkill.Render();
  6767. // ScrollBar
  6768. m_sbGuildSkillBar.Render();
  6769. // Render all elements
  6770. pDrawPort->FlushRenderingQueue();
  6771.  
  6772. // Render Selected Guild Skill
  6773. pDrawPort->InitTextureData(m_ptdSelBoxTexture);
  6774. UIRectUV rcPassiveTab = m_rtSelSideTabUV;
  6775. UIRectUV rcActiveTab = m_rtUnSelSideTabUV;
  6776. UIRectUV rcPassiveImage = m_rtPassiveTabIconUV[0];
  6777. UIRectUV rcActiveImage = m_rtActiveTabIconUV[1];
  6778.  
  6779. if ( m_nSelSkillTab == GUILD_SKILL_ACTIVE )
  6780. {
  6781. rcPassiveTab = m_rtUnSelSideTabUV;
  6782. rcActiveTab = m_rtSelSideTabUV;
  6783. rcPassiveImage = m_rtPassiveTabIconUV[1];
  6784. rcActiveImage = m_rtActiveTabIconUV[0];
  6785. }
  6786. pDrawPort->AddTexture( nX + m_rcSkillTab[GUILD_SKILL_PASSIVE].Left, nY + m_rcSkillTab[GUILD_SKILL_PASSIVE].Top,
  6787. nX + m_rcSkillTab[GUILD_SKILL_PASSIVE].Right, nY + m_rcSkillTab[GUILD_SKILL_PASSIVE].Bottom,
  6788. rcPassiveTab.U0, rcPassiveTab.V0, rcPassiveTab.U1, rcPassiveTab.V1, 0xFFFFFFFF);
  6789. pDrawPort->AddTexture( nX + m_rcSkillTab[GUILD_SKILL_ACTIVE].Left, nY + m_rcSkillTab[GUILD_SKILL_ACTIVE].Top,
  6790. nX + m_rcSkillTab[GUILD_SKILL_ACTIVE].Right, nY + m_rcSkillTab[GUILD_SKILL_ACTIVE].Bottom,
  6791. rcActiveTab.U0, rcActiveTab.V0, rcActiveTab.U1, rcActiveTab.V1, 0xFFFFFFFF);
  6792. pDrawPort->AddTexture( nX + m_rcSkillTab[GUILD_SKILL_PASSIVE].Left+6 , nY + m_rcSkillTab[GUILD_SKILL_PASSIVE].Top+34,
  6793. nX + m_rcSkillTab[GUILD_SKILL_PASSIVE].Left+20, nY + m_rcSkillTab[GUILD_SKILL_PASSIVE].Top+48,
  6794. rcPassiveImage.U0, rcPassiveImage.V0, rcPassiveImage.U1, rcPassiveImage.V1, 0xFFFFFFFF);
  6795. pDrawPort->AddTexture( nX + m_rcSkillTab[GUILD_SKILL_ACTIVE].Left+6, nY + m_rcSkillTab[GUILD_SKILL_ACTIVE].Top+34,
  6796. nX + m_rcSkillTab[GUILD_SKILL_ACTIVE].Left+20, nY + m_rcSkillTab[GUILD_SKILL_ACTIVE].Top+48,
  6797. rcActiveImage.U0, rcActiveImage.V0, rcActiveImage.U1, rcActiveImage.V1, 0xFFFFFFFF);
  6798.  
  6799. if ( m_strSkillTabPopupInfo != CTString("") )
  6800. {
  6801. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Left, nY + m_rcSkillTabPopupInfo.Top,
  6802. nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Top + 8,
  6803. m_rtPopupUL.U0, m_rtPopupUL.V0, m_rtPopupUL.U1, m_rtPopupUL.V1,
  6804. 0xFFFFFFBB );
  6805. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Top,
  6806. nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Top + 8,
  6807. m_rtPopupUM.U0, m_rtPopupUM.V0, m_rtPopupUM.U1, m_rtPopupUM.V1,
  6808. 0xFFFFFFBB );
  6809. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Top,
  6810. nX + m_rcSkillTabPopupInfo.Right, nY + m_rcSkillTabPopupInfo.Top + 8,
  6811. m_rtPopupUR.U0, m_rtPopupUR.V0, m_rtPopupUR.U1, m_rtPopupUR.V1,
  6812. 0xFFFFFFBB );
  6813. pDrawPort->AddTexture( nX +m_rcSkillTabPopupInfo.Left, nY + m_rcSkillTabPopupInfo.Top + 8,
  6814. nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6815. m_rtPopupML.U0, m_rtPopupML.V0, m_rtPopupML.U1, m_rtPopupML.V1,
  6816. 0xFFFFFFBB );
  6817. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Top + 8,
  6818. nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6819. m_rtPopupMM.U0, m_rtPopupMM.V0, m_rtPopupMM.U1, m_rtPopupMM.V1,
  6820. 0xFFFFFFBB );
  6821. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Top + 8,
  6822. nX + m_rcSkillTabPopupInfo.Right, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6823. m_rtPopupMR.U0, m_rtPopupMR.V0, m_rtPopupMR.U1, m_rtPopupMR.V1,
  6824. 0xFFFFFFBB );
  6825. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Left, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6826. nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Bottom,
  6827. m_rtPopupLL.U0, m_rtPopupLL.V0, m_rtPopupLL.U1, m_rtPopupLL.V1,
  6828. 0xFFFFFFBB );
  6829. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Left + 8, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6830. nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Bottom,
  6831. m_rtPopupLM.U0, m_rtPopupLM.V0, m_rtPopupLM.U1, m_rtPopupLM.V1,
  6832. 0xFFFFFFBB );
  6833. pDrawPort->AddTexture( nX + m_rcSkillTabPopupInfo.Right - 8, nY + m_rcSkillTabPopupInfo.Bottom - 8,
  6834. nX + m_rcSkillTabPopupInfo.Right, nY + m_rcSkillTabPopupInfo.Bottom,
  6835. m_rtPopupLR.U0, m_rtPopupLR.V0, m_rtPopupLR.U1, m_rtPopupLR.V1,
  6836. 0xFFFFFFBB );
  6837.  
  6838. int nPosX, nPosY;
  6839.  
  6840. nPosX = m_rcSkillTabPopupInfo.Left + 10;
  6841. nPosY = (m_rcSkillTabPopupInfo.GetHeight() - _pUIFontTexMgr->GetFontHeight()) /2 + m_rcSkillTabPopupInfo.Top;
  6842. pDrawPort->PutTextEx( m_strSkillTabPopupInfo, nX + nPosX, nY + nPosY, 0xF2F2F2FF );
  6843. }
  6844. if( m_bIsSelList )
  6845. { // 선택된게 있으면 그린다.
  6846. int nSelPos = m_iGuildSkillPos - m_sbGuildSkillBar.GetScrollPos();
  6847. if ( nSelPos >=0 && nSelPos < 5)
  6848. {
  6849. pDrawPort->AddTexture( nX + m_rcSkillBtn[nSelPos].Left, nY + m_rcSkillBtn[nSelPos].Top, nX + m_rcSkillBtn[nSelPos].Right,
  6850. nY + m_rcSkillBtn[nSelPos].Bottom, m_rtSelBoxUV.U0, m_rtSelBoxUV.V0, m_rtSelBoxUV.U1, m_rtSelBoxUV.V1, 0xFFFFFFFF);
  6851. }
  6852. }
  6853. }
  6854.  
  6855. // ----------------------------------------------------------------------------
  6856. // Name : GetGuildSkill()
  6857. // Desc :
  6858. // ----------------------------------------------------------------------------
  6859. CSkill* CUIGuild::GetGuildSkill(int nPos)
  6860. {
  6861. if ( m_nSelSkillTab == GUILD_SKILL_PASSIVE )
  6862. {
  6863. return &m_vecGuildPassiveSkill[nPos];
  6864. }
  6865. else
  6866. {
  6867. return &m_vecGuildActiveSkill[nPos];
  6868. }
  6869. }
  6870.  
  6871. // ----------------------------------------------------------------------------
  6872. // Name : SetGuildSkillInfo()
  6873. // Desc : 길드 스킬 정보 설정 : 사용 정보/습득 정보
  6874. // ----------------------------------------------------------------------------
  6875. void CUIGuild::SetGuildSkillInfo()
  6876. {
  6877. int i;
  6878. m_lbUseInfo.ResetAllStrings();
  6879. m_lbLearnInfo.ResetAllStrings();
  6880. CSkill* pSkill = GetGuildSkill(m_iGuildSkillPos);
  6881. CTString strMessage;
  6882. CTString strSkillName;
  6883.  
  6884. // ------------------------------------------------------------------
  6885. // 사용 정보
  6886. int nCurSkillLevel = pSkill->GetCurLevel();
  6887. int nMaxSkillLevel = pSkill->GetMaxLevel();
  6888.  
  6889. COLOR colUseSkillInfo;
  6890. COLOR colLearnSkillInfo;
  6891. colUseSkillInfo = 0x00ffffff;
  6892. colLearnSkillInfo = 0x99ff33ff;
  6893.  
  6894. if ( nCurSkillLevel > 0)
  6895. { // 배운 스킬이 있을 때만 사용 정보 표시
  6896. int nSkillLevel = nCurSkillLevel-1; // 접근자
  6897.  
  6898. int nNeedGP = pSkill->GetNeedGP(nSkillLevel); // 소모 GP
  6899. int nNeedItemIndex1 = pSkill->GetNeedItemIndex1(nSkillLevel); // 소모 아이템1
  6900. int nNeedItemIndex2 = pSkill->GetNeedItemIndex2(nSkillLevel); // 소모 아이템2
  6901. int nNeedItemCount1 = pSkill->GetNeedItemCount1(nSkillLevel); // 소모 아이템1의 갯수
  6902. int nNeedItemCount2 = pSkill->GetNeedItemCount2(nSkillLevel); // 소모 아이템2의 갯수
  6903. int nPower = pSkill->GetPower(nSkillLevel); // 위력
  6904. float nRange = pSkill->GetAppRange(); // 유효 거리
  6905. int nDurTime = pSkill->GetDurTime(nSkillLevel)/10; // 지속 시간
  6906. int nReuseTime = pSkill->GetReUseTime()/10; // 재사용 시간
  6907.  
  6908. CUIManager* pUIManager = CUIManager::getSingleton();
  6909.  
  6910. // Current Skill Level
  6911. strMessage.PrintF( _S ( 5120, "현재 스킬 레벨 : %d" ), nCurSkillLevel);
  6912. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6913.  
  6914. if ( nNeedGP > 0 )
  6915. { // Need GP
  6916. strMessage.PrintF( _S( 5032, "소모 GP : %d" ), nNeedGP);
  6917. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6918. }
  6919. if ( nNeedItemIndex1 > 0 || nNeedItemIndex2 > 0 )
  6920. {
  6921. strMessage.PrintF( _S( 259, "필요 아이템" ));
  6922. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6923. if ( nNeedItemIndex1 > 0)
  6924. { // Need Item1
  6925. strMessage.PrintF( _S( 260, " %s %d개" ), _pNetwork->GetItemName(nNeedItemIndex1), nNeedItemCount1 );
  6926. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6927. }
  6928. if ( nNeedItemIndex2 > 0)
  6929. { // Need Item2
  6930. strMessage.PrintF( _S( 260, " %s %d개" ), _pNetwork->GetItemName(nNeedItemIndex1), nNeedItemCount2 );
  6931. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6932. }
  6933. }
  6934. if ( nPower > 0 )
  6935. { // Skill Power
  6936. strMessage.PrintF( _S( 65, "위력 : %d" ), nPower );
  6937. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6938. }
  6939. if ( nRange > 0 )
  6940. { // Skill Range
  6941. strMessage.PrintF( _S( 66, "유효 거리 : %.1f" ), nRange );
  6942. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6943. }
  6944. if ( nDurTime > 0 )
  6945. { // Skill Time
  6946. strMessage.PrintF( _S( 4172, "지속시간 : %d초" ), nDurTime );
  6947. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6948. }
  6949. if ( nReuseTime > 0 )
  6950. { // Skill ReUsed Time
  6951. strMessage.PrintF( _S( 4173, "재사용 시간 : %d초" ), nReuseTime);
  6952. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6953. }
  6954. // Skill Target Type
  6955. char nTargetType = pSkill->GetTargetType();
  6956. if ( nTargetType == CSkill::STT_GUILD_ALL )
  6957. { // Skill Target Type : GUILD ALL
  6958. strMessage.PrintF( _S( 5121, "타겟대상 : 길드원 전체" ));
  6959. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6960. }
  6961. else if ( nTargetType == CSkill::STT_GUILD_ONE )
  6962. { // Skill Target Type : GUILD ONE
  6963. strMessage.PrintF( _S( 5122, "타겟대상 : 길드원 한명" ));
  6964. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6965. }
  6966. else if ( nTargetType == CSkill::STT_GUILD_SELF_RANGE )
  6967. { // Skill Target Type : GUILD SELF RANGE
  6968. strMessage.PrintF( _S ( 5123, "타겟대상 : 주변 적" ));
  6969. pUIManager->AddStringToList(&m_lbUseInfo, strMessage, 20, colUseSkillInfo);
  6970. }
  6971. }
  6972.  
  6973. // ------------------------------------------------------------------
  6974. // 습득 정보
  6975. if ( nCurSkillLevel < nMaxSkillLevel )
  6976. { // 다음 레벨 습득 정보
  6977. int nNextSkilllevel = nCurSkillLevel; // 다음 레벨 접근자
  6978.  
  6979. int nLearnLevel = pSkill->GetLearnLevel(nNextSkilllevel); // 스킬 습득 시, 필요 레벨
  6980. int nLearnGP = pSkill->GetLearnGP(nNextSkilllevel); // 스킬 습득 시, 필요 GP
  6981. int nLearnStr = pSkill->GetLearnStr(nNextSkilllevel); // 스킬 습득 시, 필요 힘
  6982. int nLearnDex = pSkill->GetLearnDex(nNextSkilllevel); // 스킬 습득 시, 필요 민첩
  6983. int nLearnInt = pSkill->GetLearnInt(nNextSkilllevel); // 스킬 습득 시, 필요 지혜
  6984. int nLearnCon = pSkill->GetLearnCon(nNextSkilllevel); // 스킬 습득 시, 필요 체질
  6985. int nNeedGP = pSkill->GetNeedGP(nNextSkilllevel); // 스킬 사용 시, 필요 GP
  6986. int nPower = pSkill->GetPower(nNextSkilllevel); // 스킬 위력
  6987. float nRange = pSkill->GetAppRange(); // 스킬 유효 거리
  6988. int nDurTime = pSkill->GetDurTime(nNextSkilllevel)/10; // 스킬 지속 시간
  6989. int nReuseTime = pSkill->GetReUseTime()/10; // 스킬 재사용 시간
  6990. int nLearnItemIndex[3], nLearnItemCount[3], nLearnSkillIndex[3], nLearnSkillLevel[3];
  6991. for ( i = 0; i < 3; ++i )
  6992. {
  6993. nLearnItemIndex[i] = pSkill->GetLearnItemIndex(nNextSkilllevel, i); // 스킬 습득 시, 필요 아이템
  6994. nLearnItemCount[i] = pSkill->GetLearnItemCount(nNextSkilllevel, i); // 스킬 습득 시, 필요 아이템 갯수
  6995. nLearnSkillIndex[i] = pSkill->GetLearnSkillIndex(nNextSkilllevel, i); // 스킬 습득 시, 필요 스킬
  6996. nLearnSkillLevel[i] = pSkill->GetLearnSkillLevel(nNextSkilllevel, i); // 스킬 습득 시, 필요 스킬 레벨
  6997. }
  6998.  
  6999. CUIManager* pUIManager = CUIManager::getSingleton();
  7000.  
  7001. // Next Skill Level
  7002. strMessage.PrintF( _S( 5118, "다음 스킬 레벨 : %d" ), nNextSkilllevel+1 );
  7003. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7004.  
  7005. if ( nLearnLevel > 0 )
  7006. { // Learn Level
  7007. strMessage.PrintF( _S( 256, "필요 레벨 : %d" ), nLearnLevel);
  7008. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7009. }
  7010. if ( nLearnGP > 0 )
  7011. { // Learn GP
  7012. strMessage.PrintF( _S( 5119, "필요 GP : %d" ), nLearnGP);
  7013. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7014. }
  7015.  
  7016. for ( i = 0; i < 3; ++i )
  7017. { // Learn Item
  7018. if ( nLearnItemIndex[i] > 0 )
  7019. {
  7020. strMessage.PrintF( _S( 260, " %s %d개" ), _pNetwork->GetItemName( nLearnItemIndex[i] ), nLearnItemCount[i] );
  7021. strMessage = _S( 259, "필요 아이템" ) + strMessage;
  7022. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7023. }
  7024. }
  7025. if ( nLearnStr > 0 )
  7026. { // Learn STR
  7027. strMessage.PrintF( _S( 1391, "필요 힘 : %d" ), nLearnStr);
  7028. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7029. }
  7030. if ( nLearnDex > 0 )
  7031. { // Learn DEX
  7032. strMessage.PrintF( _S( 1392, "필요 민첩 : %d" ), nLearnDex);
  7033. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7034. }
  7035. if ( nLearnInt > 0 )
  7036. { // Learn INT
  7037. strMessage.PrintF( _S( 1393, "필요 지혜 : %d" ), nLearnInt);
  7038. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7039. }
  7040. if ( nLearnCon > 0 )
  7041. { // Learn CON
  7042. strMessage.PrintF( _S( 1394, "필요 체질 : %d" ), nLearnCon);
  7043. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7044. }
  7045. for ( i = 0; i < 3; ++i )
  7046. { // Learn Skill
  7047. if ( nLearnSkillIndex[i] > 0 )
  7048. {
  7049. strMessage.PrintF( " : %s Lv.%d", _pNetwork->GetSkillData(nLearnSkillIndex[i]).GetName(), nLearnSkillLevel[i] );
  7050. strMessage = _S( 258, "필요 스킬" ) + strMessage;
  7051. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7052. }
  7053. }
  7054. if ( nNeedGP > 0 )
  7055. { // Need GP
  7056. strMessage.PrintF( _S( 5032, "소모 GP : %d" ), nNeedGP);
  7057. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7058. }
  7059. if ( nPower > 0 )
  7060. { // Skill Power
  7061. strMessage.PrintF( _S( 65, "위력 : %d" ), nPower );
  7062. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7063. }
  7064. if ( nRange > 0 )
  7065. { // Skill Range
  7066. strMessage.PrintF( _S( 66, "유효 거리 : %.1f" ), nRange );
  7067. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7068. }
  7069. if ( nDurTime > 0 )
  7070. { // Skill Time
  7071. strMessage.PrintF( _S( 4172, "지속시간 : %d초" ), nDurTime);
  7072. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7073. }
  7074. if ( nReuseTime > 0 )
  7075. { // ReUse Time
  7076. strMessage.PrintF( _S( 4173, "재사용 시간 : %d초" ), nReuseTime );
  7077. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7078. }
  7079. // Skill Target Type
  7080. char nTargetType = pSkill->GetTargetType();
  7081. if ( nTargetType == CSkill::STT_GUILD_ALL )
  7082. {
  7083. strMessage.PrintF( _S( 5121, "타겟대상 : 길드원 전체" ));
  7084. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7085. }
  7086. else if ( nTargetType == CSkill::STT_GUILD_ONE )
  7087. {
  7088. strMessage.PrintF( _S( 5122, "타겟대상 : 길드원 한명" ));
  7089. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7090. }
  7091. else if ( nTargetType == CSkill::STT_GUILD_SELF_RANGE )
  7092. {
  7093. strMessage.PrintF( _S ( 5123, "타겟대상 : 주변 적" ));
  7094. pUIManager->AddStringToList(&m_lbLearnInfo, strMessage, 20, colLearnSkillInfo);
  7095. }
  7096. }
  7097. }
  7098.  
  7099. // ----------------------------------------------------------------------------
  7100. // Name : ReceiveGuildSkillExtend()
  7101. // Desc : 길드 스킬 정보 받기
  7102. // ----------------------------------------------------------------------------
  7103. void CUIGuild::ReceiveGuildSkillExtend(CNetworkMessage* istr)
  7104. {
  7105. SetGuildSkillList();
  7106.  
  7107. INDEX iSkillType, iCount, iSkillIndex, iSkillLevel, iLoopCnt, iCoolTime;
  7108. // Active Guild Skill
  7109. (*istr) >> iSkillType;
  7110. if ( iSkillType == GUILD_ACTIVE_SKILL_START )
  7111. { // Active Guild Skill
  7112. (*istr) >> iCount;
  7113. if ( iCount == 0)
  7114. {
  7115. for(int i=0; i<m_vecGuildActiveSkill.size(); ++i)
  7116. {
  7117. m_vecGuildActiveSkill[i].SetCurLevel(0);
  7118. }
  7119. }
  7120. else
  7121. {
  7122. for (iLoopCnt=0; iLoopCnt<iCount; ++iLoopCnt)
  7123. {
  7124. (*istr) >> iSkillIndex
  7125. >> iSkillLevel
  7126. >> iCoolTime;
  7127.  
  7128. MY_INFO()->SetSkill(iSkillIndex, iSkillLevel);
  7129.  
  7130. for(int j=0; j<m_vecGuildActiveSkill.size(); ++j)
  7131. {
  7132. if( m_vecGuildActiveSkill[j].GetIndex() == iSkillIndex )
  7133. {
  7134. m_vecGuildActiveSkill[j].SetCurLevel(iSkillLevel);
  7135.  
  7136. if (iCoolTime > 0)
  7137. {
  7138. SLONG slRemainTime = ((SLONG)time(NULL) - _pNetwork->slServerTimeGap) - iCoolTime;
  7139. CSkill &SkillData = _pNetwork->GetSkillData( iSkillIndex );
  7140. SkillData.SetStartTime(slRemainTime);
  7141. m_vecGuildActiveSkill[j].SetStartTime(slRemainTime);
  7142. }
  7143. break;
  7144. }
  7145. }
  7146. }
  7147. }
  7148. }
  7149. // Passive Guild Skill
  7150. (*istr) >> iSkillType;
  7151. if ( iSkillType == GUILD_PASSIVE_SKILL_START )
  7152. { // Passive Guild Skill
  7153. (*istr) >> iCount;
  7154. if ( iCount == 0)
  7155. {
  7156. for(int i=0; i<m_vecGuildPassiveSkill.size(); ++i)
  7157. {
  7158. m_vecGuildPassiveSkill[i].SetCurLevel(0);
  7159. }
  7160. }
  7161. else
  7162. {
  7163. for (iLoopCnt=0; iLoopCnt<iCount; ++iLoopCnt)
  7164. {
  7165. (*istr) >> iSkillIndex
  7166. >> iSkillLevel;
  7167.  
  7168. MY_INFO()->SetSkill(iSkillIndex, iSkillLevel);
  7169.  
  7170. for(int j=0; j<m_vecGuildPassiveSkill.size(); ++j)
  7171. {
  7172. if( m_vecGuildPassiveSkill[j].GetIndex() == iSkillIndex )
  7173. {
  7174. m_vecGuildPassiveSkill[j].SetCurLevel(iSkillLevel);
  7175. break;
  7176. }
  7177. }
  7178. }
  7179. }
  7180. }
  7181. // Etc Guild Skill : Nothing (길드 Active/Passive만 처리)
  7182. (*istr) >> iSkillType;
  7183. if ( iSkillType == GUILD_ETC_SKILL_START )
  7184. { // Passive Guild Skill
  7185. (*istr) >> iCount;
  7186. for (iLoopCnt=0; iLoopCnt<iCount; ++iLoopCnt)
  7187. {
  7188. (*istr) >> iSkillIndex
  7189. >> iSkillLevel;
  7190. // Nothing : 길드 Active/Passive만 처리
  7191. MY_INFO()->SetSkill(iSkillIndex, iSkillLevel);
  7192. }
  7193. }
  7194.  
  7195. SetSkillBtnInfo();
  7196. }
  7197.  
  7198. // ----------------------------------------------------------------------------
  7199. // Name : GetSkillButton()
  7200. // Desc : 길드 스킬 버튼 얻기
  7201. // ----------------------------------------------------------------------------
  7202. CUIIcon* CUIGuild::GetSkillButton(int nPos)
  7203. {
  7204. return m_pIconsGuildSkillEx[nPos - m_sbGuildSkillBar.GetScrollPos()];
  7205. }
  7206.  
  7207. // ----------------------------------------------------------------------------
  7208. // Name : GetGuildSkillCount(eGUILDSKILL SkillType)
  7209. // Desc : 길드 스킬 총 갯수 얻기
  7210. // ----------------------------------------------------------------------------
  7211. int CUIGuild::GetGuildSkillCount()
  7212. {
  7213. if ( m_nSelSkillTab == GUILD_SKILL_PASSIVE )
  7214. {
  7215. return m_vecGuildPassiveSkill.size();
  7216. }
  7217. else
  7218. {
  7219. return m_vecGuildActiveSkill.size();
  7220. }
  7221. }
  7222.  
  7223. // ----------------------------------------------------------------------------
  7224. // Name : CheckUseGuildSkill()
  7225. // Desc : 길드 스킬 사용 조건 체크
  7226. // ----------------------------------------------------------------------------
  7227. BOOL CUIGuild::CheckUseGuildSkill(int nSkillIndex)
  7228. {
  7229. SBYTE sbSkillLevel = GetGuildSkillLevel(nSkillIndex);
  7230.  
  7231. CSkill skill = _pNetwork->GetSkillData(nSkillIndex);
  7232. int nNeedGP = skill.GetNeedGP(sbSkillLevel-1);
  7233. char nTargetType = skill.GetTargetType();
  7234.  
  7235. CUIManager* pUIMgr = UIMGR();
  7236. CChattingUI* pChat = pUIMgr->GetChattingUI();
  7237.  
  7238. if ( nTargetType != CSkill::STT_GUILD_MEMBER_SELF)
  7239. {
  7240. // 길드원 전부가 사용가능한 타입이 아닐경우는 길마일 경우만 스킬 사용
  7241. if ( _pNetwork->MyCharacterInfo.lGuildPosition != GUILD_MEMBER_BOSS )
  7242. {
  7243. if (pChat)
  7244. pChat->AddSysMessage( _S(5029, "길드 마스터만 스킬 사용이 가능합니다."));
  7245.  
  7246. return FALSE;
  7247. }
  7248. }
  7249.  
  7250. if ( _pNetwork->MyCharacterInfo.iGP < nNeedGP )
  7251. { // 현재 GP가 소모 GP보다 크면 스킬 사용
  7252. if (pChat)
  7253. pChat->AddSysMessage( _S(5028, "GP가 부족하여 스킬을 사용할 수 없습니다."));
  7254.  
  7255. return FALSE;
  7256. }
  7257.  
  7258. if (nSkillIndex == DEF_GUILD_RECALL_SKILL_IDX)
  7259. {
  7260. pUIMgr->CloseMessageBox( MSGCMD_GUILD_RECALL_USE_REQ );
  7261.  
  7262. CTString strMessage;
  7263. CUIMsgBox_Info MsgBoxInfo;
  7264. MsgBoxInfo.SetMsgBoxInfo( _S( 865, "길드" ), UMBS_OKCANCEL, UI_GUILD, MSGCMD_GUILD_RECALL_USE_REQ );
  7265. strMessage.PrintF( _S( 6435, "길드원들을 길드방으로 소환하시겠습니까?" ) );
  7266. MsgBoxInfo.AddString( strMessage );
  7267.  
  7268. pUIMgr->CreateMessageBox( MsgBoxInfo );
  7269. return FALSE;
  7270. }
  7271.  
  7272. return TRUE;
  7273. }
  7274.  
  7275. // ----------------------------------------------------------------------------
  7276. // Name : StartGuildSkillDelay()
  7277. // Desc : 길드 스킬 딜레이 설정
  7278. // ----------------------------------------------------------------------------
  7279. BOOL CUIGuild::StartGuildSkillDelay( int nSkillIndex )
  7280. {
  7281. int i;
  7282. BOOL bResult = FALSE;
  7283. for( i = 0; i < GUILD_SKILL_VIEW_MAX; ++i )
  7284. {
  7285. if (m_pIconsGuildSkillEx[i]->getIndex() == nSkillIndex)
  7286. {
  7287. if (MY_INFO()->GetSkillDelay(nSkillIndex) == true)
  7288. {
  7289. m_pIconsGuildSkillEx[i]->setCooltime(true);
  7290. bResult = TRUE;
  7291. }
  7292. else
  7293. {
  7294. continue;
  7295. }
  7296. }
  7297. }
  7298. for( i = 0; i < m_vecGuildActiveSkill.size(); ++i )
  7299. {
  7300. if ( m_vecGuildActiveSkill[i].GetIndex() == nSkillIndex )
  7301. {
  7302. m_vecGuildActiveSkill[i].Skill_Data.Skill_StartTime = _pNetwork->GetSkillData( nSkillIndex ).Skill_Data.Skill_StartTime;
  7303. }
  7304. }
  7305. return bResult;
  7306. }
  7307.  
  7308. // ----------------------------------------------------------------------------
  7309. // Name : SetSkillPopupInfo()
  7310. // Desc : 길드 스킬 팝업 정보 설정
  7311. // ----------------------------------------------------------------------------
  7312. void CUIGuild::SetSkillPopupInfo(int nTab)
  7313. {
  7314. if ( nTab == GUILD_SKILL_PASSIVE )
  7315. {
  7316. m_strSkillTabPopupInfo = _S(67, "패시브 스킬");
  7317. }
  7318. else
  7319. {
  7320. m_strSkillTabPopupInfo = _S(63, "액티브 스킬");
  7321. }
  7322.  
  7323. int nWidth = m_strSkillTabPopupInfo.Length() * _pUIFontTexMgr->GetFontWidth();
  7324. m_rcSkillTabPopupInfo.SetRect( m_rcSkillTab[nTab].Left - nWidth - 20, m_rcSkillTab[nTab].Top, m_rcSkillTab[nTab].Left, m_rcSkillTab[nTab].Top + 30 );
  7325. if ( m_nPosX < nWidth )
  7326. {
  7327. m_rcSkillTabPopupInfo.SetRect( m_rcSkillTab[nTab].Right, m_rcSkillTab[nTab].Top, m_rcSkillTab[nTab].Right+100, m_rcSkillTab[nTab].Top + 30 );
  7328. }
  7329. }
  7330.  
  7331. // ----------------------------------------------------------------------------
  7332. // Name : GetSelectedPositon()
  7333. // Desc : 부대 선택 콤보 박스에서 직위 얻기
  7334. // ----------------------------------------------------------------------------
  7335. INDEX CUIGuild::GetSelectedPositon()
  7336. {
  7337. int iPosition = GUILD_MEMBER_NOMEMBER;
  7338. int iSelMember = m_lbManageMemberList.GetCurSel();
  7339. if( iSelMember != -1 )
  7340. {
  7341. sGuildMember &TmpMember = m_vectorMemberList[iSelMember];
  7342. iPosition = TmpMember.eRanking;
  7343. if ( iPosition != GUILD_MEMBER_BOSS && iPosition != GUILD_MEMBER_VICE_BOSS )
  7344. {
  7345. int nSelCombo = m_cmbCorps.GetCurSel();
  7346. switch( nSelCombo )
  7347. {
  7348. case CMB_RUSH_CAPTAIN:
  7349. iPosition = GUILD_MEMBER_RUSH_CAPTAIN;
  7350. break;
  7351. case CMB_SUPPORT_CAPTAIN:
  7352. iPosition = GUILD_MEMBER_SUPPORT_CAPTAIN;
  7353. break;
  7354. case CMB_RECON_CAPTAIN:
  7355. iPosition = GUILD_MEMBER_RECON_CAPTAIN;
  7356. break;
  7357. case CMB_RUSH_MEMBER:
  7358. iPosition = GUILD_MEMBER_RUSH;
  7359. break;
  7360. case CMB_SUPPORT_MEMBER:
  7361. iPosition = GUILD_MEMBER_SUPPORT;
  7362. break;
  7363. case CMB_RECON_MEMBER:
  7364. iPosition = GUILD_MEMBER_RECON;
  7365. break;
  7366. case CMB_NOMEMBER:
  7367. iPosition = GUILD_MEMBER_MEMBER;
  7368. break;
  7369. }
  7370. }
  7371. }
  7372. return iPosition;
  7373. }
  7374.  
  7375. // ----------------------------------------------------------------------------
  7376. // Name : SetSkillBtnInfo()
  7377. // Desc : 길드 스킬 버튼 정보 설정
  7378. // ----------------------------------------------------------------------------
  7379. void CUIGuild::SetSkillBtnInfo()
  7380. {
  7381. int nScrollPos = m_sbGuildSkillBar.GetScrollPos();
  7382. int nSkillCount = GetGuildSkillCount();
  7383. int nLoopCnt = ( nSkillCount>5 ) ? 5 : nSkillCount;
  7384.  
  7385. for ( int nIndex=0; nIndex<nLoopCnt; ++nIndex )
  7386. {
  7387. CSkill SkillData;
  7388. if ( m_nSelSkillTab == GUILD_SKILL_PASSIVE )
  7389. {
  7390. SkillData = m_vecGuildPassiveSkill[nIndex+nScrollPos];
  7391. }
  7392. else
  7393. {
  7394. SkillData = m_vecGuildActiveSkill[nIndex+nScrollPos];
  7395. }
  7396.  
  7397. if (MY_INFO()->GetReuseSkill(SkillData.GetIndex()) > 0)
  7398. {
  7399. MY_INFO()->SetSkillDelay(SkillData.GetIndex(), true);
  7400. m_pIconsGuildSkillEx[nIndex]->setCooltime(true);
  7401. }
  7402.  
  7403. m_pIconsGuildSkillEx[nIndex]->setData(UBET_SKILL, SkillData.GetIndex());
  7404. }
  7405. }
  7406.  
  7407. // ----------------------------------------------------------------------------
  7408. // Name : GetReuseTime()
  7409. // Desc : 재사용시간 얻기
  7410. // ----------------------------------------------------------------------------
  7411. DOUBLE CUIGuild::GetReuseTime( INDEX SkillIndex )
  7412. {
  7413. CSkill SkillData = _pNetwork->GetSkillData( SkillIndex );
  7414. DOUBLE ReuseTime = SkillData.GetReUseTime();
  7415.  
  7416. return DOUBLE( ReuseTime + _pNetwork->MyCharacterInfo.magicspeed ) / 10.0;
  7417.  
  7418. }
  7419.  
  7420. // ----------------------------------------------------------------------------
  7421. // Name : GetCoolTime()
  7422. // Desc : 쿨타임 얻기
  7423. // ----------------------------------------------------------------------------
  7424. DOUBLE CUIGuild::GetCoolTime( DOUBLE ReuseTime, DOUBLE StartTime )
  7425. {
  7426. DOUBLE coolTime = ReuseTime - (_pTimer->GetHighPrecisionTimer().GetSeconds() - StartTime);
  7427.  
  7428. return ( coolTime >= 0 ? coolTime : 0 );
  7429. }
  7430.  
  7431. // ----------------------------------------------------------------------------
  7432. // Name : GetSkillDelay()
  7433. // Desc : 스킬 딜레이 얻기
  7434. // ----------------------------------------------------------------------------
  7435. BOOL CUIGuild::GetSkillDelay( INDEX index )
  7436. {
  7437. for ( int i=0; i<m_vecGuildActiveSkill.size(); ++i )
  7438. {
  7439. CSkill& SkillData = m_vecGuildActiveSkill[i];
  7440. if ( m_vecGuildActiveSkill[i].GetIndex() == index )
  7441. {
  7442. DOUBLE ReuseTime = GetReuseTime( SkillData.GetIndex() );
  7443. DOUBLE StartTime = SkillData.Skill_Data.Skill_StartTime;
  7444. DOUBLE CoolTime = GetCoolTime( ReuseTime, StartTime );
  7445. if ( CoolTime > 0 )
  7446. {
  7447. return TRUE;
  7448. }
  7449. }
  7450. }
  7451. return FALSE;
  7452. }
  7453.  
  7454. // ----------------------------------------------------------------------------
  7455. // Name : SetCorpsInfo()
  7456. // Desc : 길드의 부대 정보 설정
  7457. // ----------------------------------------------------------------------------
  7458. void CUIGuild::SetCorpsInfo( INDEX memberCount, INDEX bossCount )
  7459. {
  7460. m_iCorpsMember = memberCount;
  7461. m_iCorpsBoss = bossCount;
  7462. }
  7463.  
  7464. // ----------------------------------------------------------------------------
  7465. // Name : SetCorpsComboBox()
  7466. // Desc : 부대 설정 콤보 박스 설정
  7467. // ----------------------------------------------------------------------------
  7468. void CUIGuild::SetCorpsComboBox()
  7469. {
  7470. m_cmbCorps.ResetStrings();
  7471.  
  7472. int iSelMember = m_lbManageMemberList.GetCurSel();
  7473. if( iSelMember != -1 )
  7474. {
  7475. sGuildMember &TmpMember = m_vectorMemberList[iSelMember];
  7476. int nPosition = TmpMember.eRanking;
  7477. int nSelCombo = CMB_NOMEMBER;
  7478.  
  7479. switch( nPosition )
  7480. {
  7481. case GUILD_MEMBER_BOSS:
  7482. {
  7483. m_cmbCorps.AddString( m_strCorps[GUILD_MEMBER_BOSS] );
  7484. nSelCombo = 0;
  7485. }
  7486. break;
  7487. case GUILD_MEMBER_VICE_BOSS:
  7488. {
  7489. m_cmbCorps.AddString( m_strCorps[GUILD_MEMBER_VICE_BOSS] );
  7490. nSelCombo = 0;
  7491. }
  7492. break;
  7493. case GUILD_MEMBER_RUSH_CAPTAIN:
  7494. nSelCombo = CMB_RUSH_CAPTAIN;
  7495. break;
  7496. case GUILD_MEMBER_SUPPORT_CAPTAIN:
  7497. nSelCombo = CMB_SUPPORT_CAPTAIN;
  7498. break;
  7499. case GUILD_MEMBER_RECON_CAPTAIN:
  7500. nSelCombo = CMB_RECON_CAPTAIN;
  7501. break;
  7502. case GUILD_MEMBER_RUSH:
  7503. nSelCombo = CMB_RUSH_MEMBER;
  7504. break;
  7505. case GUILD_MEMBER_SUPPORT:
  7506. nSelCombo = CMB_SUPPORT_MEMBER;
  7507. break;
  7508. case GUILD_MEMBER_RECON:
  7509. nSelCombo = CMB_RECON_MEMBER;
  7510. break;
  7511. case GUILD_MEMBER_MEMBER:
  7512. nSelCombo = CMB_NOMEMBER;
  7513. break;
  7514. }
  7515.  
  7516. if ( nPosition != GUILD_MEMBER_BOSS && nPosition != GUILD_MEMBER_VICE_BOSS )
  7517. {
  7518. for ( int iPos=GUILD_MEMBER_MEMBER; iPos<GUILD_MEMBER_TOTAL; ++iPos )
  7519. {
  7520. m_cmbCorps.AddString( m_strCorps[iPos] );
  7521. }
  7522. }
  7523.  
  7524. m_cmbCorps.SetCurSel( nSelCombo );
  7525. }
  7526. }
  7527.  
  7528. // ----------------------------------------------------------------------------
  7529. // Name : InitString()
  7530. // Desc : 부대 관련 스트링 설정
  7531. // ----------------------------------------------------------------------------
  7532. void CUIGuild::InitString()
  7533. {
  7534. m_strCorps[GUILD_MEMBER_BOSS] = _S( 891, "길드장" );
  7535. m_strCorps[GUILD_MEMBER_VICE_BOSS] = _S( 892, "길드부장" );
  7536. m_strCorps[GUILD_MEMBER_MEMBER] = _S( 893, "길드원" );
  7537. m_strCorps[GUILD_MEMBER_RUSH_CAPTAIN] = _S( 5323, "돌격대장" );
  7538. m_strCorps[GUILD_MEMBER_SUPPORT_CAPTAIN] = _S( 5324, "지원대장" );
  7539. m_strCorps[GUILD_MEMBER_RECON_CAPTAIN] = _S( 5325, "정찰대장" );
  7540. m_strCorps[GUILD_MEMBER_RUSH] = _S( 5326, "돌격대원" );
  7541. m_strCorps[GUILD_MEMBER_SUPPORT] = _S( 5327, "지원대원" );
  7542. m_strCorps[GUILD_MEMBER_RECON] = _S( 5328, "정찰대원" );
  7543. }
  7544.  
  7545. // ----------------------------------------------------------------------------
  7546. // Name : ReceiveCorpsInfo()
  7547. // Desc : 길드 부대 정보 받기
  7548. // ----------------------------------------------------------------------------
  7549. void CUIGuild::ReceiveCorpsInfo( CNetworkMessage* istr )
  7550. {
  7551. INDEX iCorpsMember, iCorpsBoss;
  7552.  
  7553. (*istr) >> iCorpsMember
  7554. >> iCorpsBoss;
  7555.  
  7556. SetCorpsInfo( iCorpsMember, iCorpsBoss );
  7557. }
  7558.  
  7559. WMSG_RESULT CUIGuild::OpenGuildPop( int nMemberIdx, int nX, int nY )
  7560. {
  7561. CUIManager* pUIManager = CUIManager::getSingleton();
  7562. CTString strTargetName = m_lbGuildMemberList.GetString(1, nMemberIdx);
  7563.  
  7564. if ( IsOnline(strTargetName) == FALSE )
  7565. {
  7566. pUIManager->GetChattingUI()->AddSysMessage(_S(4523, "대상을 찾을 수 없습니다."), SYSMSG_ERROR);
  7567. return WMSG_FAIL;
  7568. }
  7569.  
  7570. int nCharIndex = GetMemberNetIdx(strTargetName);
  7571. pUIManager->GetSimplePop()->OpenPopNoTarget(strTargetName, nCharIndex,
  7572. (GAMEDATAMGR()->GetPartyInfo()->GetMemberCount() > 0 && GAMEDATAMGR()->GetPartyInfo()->AmILeader()) ? true : false, nX, nY);
  7573.  
  7574. return WMSG_SUCCESS;
  7575. }
  7576.  
  7577. BOOL CUIGuild::IsOnline( CTString strName )
  7578. {
  7579. std::vector<sGuildMember>::iterator iter = m_vectorMemberList.begin();
  7580. std::vector<sGuildMember>::iterator iter_end = m_vectorMemberList.end();
  7581.  
  7582. for (; iter != iter_end; ++iter)
  7583. {
  7584. if ((*iter).strMemberName == strName)
  7585. return (*iter).bOnline;
  7586. }
  7587.  
  7588. return false;
  7589. }
  7590.  
  7591. int CUIGuild::GetMemberNetIdx( CTString strName )
  7592. {
  7593. std::vector<sGuildMember>::iterator iter = m_vectorMemberList.begin();
  7594. std::vector<sGuildMember>::iterator iter_end = m_vectorMemberList.end();
  7595.  
  7596. for (; iter != iter_end; ++iter)
  7597. {
  7598. if ((*iter).strMemberName == strName)
  7599. return (*iter).lIndex;
  7600. }
  7601.  
  7602. return -1;
  7603. }
  7604.  
  7605.  
  7606. void CUIGuild::ArrangeMemList(const int eType)
  7607. {
  7608. #if !defined(WORLD_EDITOR)
  7609. int i;
  7610. for (i = 0; i < eGML_MAX; ++i)
  7611. {
  7612. if (i == eType)
  7613. continue;
  7614.  
  7615. m_pCbMemberArrange[i]->SetCheck(FALSE);
  7616. }
  7617.  
  7618. BOOL bAscending = !(m_pCbMemberArrange[eType]->IsChecked());
  7619.  
  7620. m_lbGuildMemberList.Reset();
  7621. m_lbGuildMemberList.ResetAllStrings();
  7622.  
  7623. switch(eType)
  7624. {
  7625. case eGML_NAME:
  7626. {
  7627. const ContGuild::nth_index<eGML_NAME>::type& use_index = m_ContGuild.get<eGML_NAME>();
  7628.  
  7629. if (bAscending == TRUE)
  7630. {
  7631. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7632. {
  7633. AddGuildMemberInfo(*(*iter).get());
  7634. }
  7635. }
  7636. else
  7637. {
  7638. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7639. {
  7640. AddGuildMemberInfo(*(*iter).get());
  7641. }
  7642. }
  7643. }
  7644. break;
  7645. case eGML_TITLE:
  7646. {
  7647. const ContGuild::nth_index<eGML_TITLE>::type& use_index = m_ContGuild.get<eGML_TITLE>();
  7648.  
  7649. if (bAscending == FALSE)
  7650. {
  7651. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7652. {
  7653. AddGuildMemberInfo(*(*iter).get());
  7654. }
  7655. }
  7656. else
  7657. {
  7658. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7659. {
  7660. AddGuildMemberInfo(*(*iter).get());
  7661. }
  7662. }
  7663. }
  7664. break;
  7665. case eGML_LV:
  7666. {
  7667. const ContGuild::nth_index<eGML_LV>::type& use_index = m_ContGuild.get<eGML_LV>();
  7668.  
  7669. if (bAscending == TRUE)
  7670. {
  7671. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7672. {
  7673. AddGuildMemberInfo(*(*iter).get());
  7674. }
  7675. }
  7676. else
  7677. {
  7678. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7679. {
  7680. AddGuildMemberInfo(*(*iter).get());
  7681. }
  7682. }
  7683. }
  7684. break;
  7685. case eGML_CLASS:
  7686. {
  7687. const ContGuild::nth_index<eGML_CLASS>::type& use_index = m_ContGuild.get<eGML_CLASS>();
  7688.  
  7689. if (bAscending == TRUE)
  7690. {
  7691. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7692. {
  7693. AddGuildMemberInfo(*(*iter).get());
  7694. }
  7695. }
  7696. else
  7697. {
  7698. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7699. {
  7700. AddGuildMemberInfo(*(*iter).get());
  7701. }
  7702. }
  7703. }
  7704. break;
  7705. case eGML_LOCAL:
  7706. {
  7707. const ContGuild::nth_index<eGML_LOCAL>::type& use_index = m_ContGuild.get<eGML_LOCAL>();
  7708.  
  7709. if (bAscending == TRUE)
  7710. {
  7711. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7712. {
  7713. AddGuildMemberInfo(*(*iter).get());
  7714. }
  7715. }
  7716. else
  7717. {
  7718. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7719. {
  7720. AddGuildMemberInfo(*(*iter).get());
  7721. }
  7722. }
  7723. }
  7724. break;
  7725. case eGML_CONTRIBUTION:
  7726. case eGML_POINT:
  7727. {
  7728. // 기여도는 누적 포인트를 나누기한 수치이므로 정렬시에는 누적포인트로 정렬 되도록 수정.
  7729. const ContGuild::nth_index<eGML_CONTRIBUTION>::type& use_index = m_ContGuild.get<eGML_CONTRIBUTION>();
  7730.  
  7731. if (bAscending == TRUE)
  7732. {
  7733. for (auto iter = use_index.begin(); iter != use_index.end(); ++iter)
  7734. {
  7735. AddGuildMemberInfo(*(*iter).get());
  7736. }
  7737. }
  7738. else
  7739. {
  7740. for (auto iter = use_index.rbegin(); iter != use_index.rend(); ++iter)
  7741. {
  7742. AddGuildMemberInfo(*(*iter).get());
  7743. }
  7744. }
  7745. }
  7746. break;
  7747. }
  7748. #endif // WORLD_EDITOR
  7749. }
  7750.  
  7751. void CUIGuild::ResetArrangeState()
  7752. {
  7753. int i;
  7754. for (i = 0; i < eGML_MAX; ++i)
  7755. {
  7756. m_pCbMemberArrange[i]->SetCheck(FALSE);
  7757. }
  7758. }
  7759.  
  7760. void CUIGuild::ClearGuildSkill()
  7761. {
  7762. ClearGuildSkillCooltime();
  7763.  
  7764. m_vecGuildPassiveSkill.clear();
  7765. m_vecGuildActiveSkill.clear();
  7766. }
  7767.  
  7768. void CUIGuild::ClearGuildSkillCooltime()
  7769. {
  7770. int size = m_vecGuildActiveSkill.size();
  7771.  
  7772. if ( size <= 0)
  7773. return;
  7774.  
  7775. for( int i = 0; i < size; ++i )
  7776. {
  7777. int nIndex = m_vecGuildActiveSkill[i].GetIndex();
  7778.  
  7779. CSkill& rSkill = _pNetwork->GetSkillData(nIndex);
  7780.  
  7781. if ( rSkill.GetFlag() & SF_GUILD && ( rSkill.GetType() != CSkill::ST_GUILD_SKILL_PASSIVE || rSkill.GetType() != CSkill::ST_PASSIVE ) )
  7782. {
  7783. rSkill.Skill_Data.Skill_StartTime = 0;
  7784. }
  7785. }
  7786. }
  7787.  
  7788. // -------------------------------------------------------------------------------------------------------->>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement