105 lines
2.4 KiB
C++
105 lines
2.4 KiB
C++
|
|
/// 2011.10.12 - prodongi
|
|
|
|
#include "stdafx.h"
|
|
#include "SUIRaidSiegeResultSiegeWnd.h"
|
|
#include "SGameManager.h"
|
|
#include "SGameOption.h"
|
|
#include <toolkit/XStringUtil.h>
|
|
#include "KUIControlStatic.h"
|
|
#include "SDungeonResourceDB.h"
|
|
#include "SStringDB.h"
|
|
|
|
SUIRaidSiegeResultSiegeWnd::SUIRaidSiegeResultSiegeWnd(SGameManager* pGameManager) : SUIRaidSiegeResultBaseWnd(pGameManager)
|
|
{
|
|
}
|
|
|
|
SUIRaidSiegeResultSiegeWnd::~SUIRaidSiegeResultSiegeWnd()
|
|
{
|
|
}
|
|
|
|
void SUIRaidSiegeResultSiegeWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
SUIWnd::PumpUpMessage(lpszControlID, nMessage, lparam, wparam);
|
|
}
|
|
|
|
void SUIRaidSiegeResultSiegeWnd::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
}
|
|
|
|
void SUIRaidSiegeResultSiegeWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd )
|
|
{
|
|
}
|
|
|
|
bool SUIRaidSiegeResultSiegeWnd::InitControls( KPoint kPos )
|
|
{
|
|
KUIControlStatic* textHelp = dynamicCast<KUIControlStatic*>(GetChild("seige_text_help_01"));
|
|
if (textHelp)
|
|
{
|
|
std::string str;
|
|
XStringUtil::Format(str, "<font:font_02><size:12><hcenter><#b7b7b7>%s", S(12025));
|
|
textHelp->SetCaption(str.c_str());
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
void SUIRaidSiegeResultSiegeWnd::setResult(char const* result)
|
|
{
|
|
extern void MsgSplit( const char* szMsg, std::vector<std::string>& vecText, const wchar_t* lpDelimiter, bool bProcSpecialCharacter=false );
|
|
|
|
std::vector<std::string> vecText;
|
|
MsgSplit(result, vecText, L"|");
|
|
|
|
KUIControlStatic* staticComplete = dynamicCast<KUIControlStatic*>(GetChild("seige_text_attack_complete_01"));
|
|
KUIControlStatic* staticOwner = dynamicCast<KUIControlStatic*>(GetChild("seige_text_result_01"));
|
|
|
|
staticComplete->SetShow(true);
|
|
staticOwner->SetShow(true);
|
|
|
|
int dungeonId = atoi(vecText[3].c_str());
|
|
int nameId = GetDungeonResDB().GetDungeonNameID(dungeonId);
|
|
|
|
std::string strComplete;
|
|
std::string strOwner;
|
|
|
|
strOwner = S(12030);
|
|
XStringUtil::Replace(strOwner, "#@guild_name@#", vecText[4].c_str());
|
|
XStringUtil::Replace(strOwner, "#@dungeon_name@#", S(nameId));
|
|
|
|
/// 성공
|
|
if ("SUCC" == vecText[1])
|
|
{
|
|
/// 방어
|
|
if ("DEF" == vecText[2])
|
|
{
|
|
strComplete = S(12028);
|
|
}
|
|
/// 공격
|
|
else
|
|
{
|
|
strComplete = S(12026);
|
|
}
|
|
}
|
|
/// 실패
|
|
else
|
|
{
|
|
/// 방어
|
|
if ("DEF" == vecText[2])
|
|
{
|
|
strComplete = S(12029);
|
|
}
|
|
/// 공격
|
|
else
|
|
{
|
|
strComplete = S(12027);
|
|
staticOwner->SetShow(false);
|
|
}
|
|
}
|
|
|
|
staticComplete->SetCaption(strComplete.c_str());
|
|
staticOwner->SetCaption(strOwner.c_str());
|
|
|
|
vecText.clear();
|
|
}
|