📄 actionshowwarschedule.cpp
字号:
////////////////////////////////////////////////////////////////////////////////// Filename : ActionShowWarSchedule.cpp// Written By : // Description :////////////////////////////////////////////////////////////////////////////////#include "ActionShowWarSchedule.h"#include "Creature.h"#include "NPC.h"#include "GamePlayer.h"#include "WarScheduler.h"#include "GuildManager.h"#include "Guild.h"#include "Zone.h"#include "ZoneUtil.h"#include "PacketUtil.h"#include "PlayerCreature.h"#include "VariableManager.h"#include "Gpackets/GCNPCResponse.h"#include "Gpackets/GCWarScheduleList.h"////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////void ActionShowWarSchedule::read (PropertyBuffer & propertyBuffer) throw (Error){ __BEGIN_TRY try { // read script id m_ZoneID = propertyBuffer.getPropertyInt("ZoneID"); } catch (NoSuchElementException & nsee) { throw Error(nsee.toString()); } __END_CATCH}////////////////////////////////////////////////////////////////////////////////// 咀记阑 角青茄促.////////////////////////////////////////////////////////////////////////////////void ActionShowWarSchedule::execute (Creature * pCreature1 , Creature * pCreature2) throw (Error){ __BEGIN_TRY Assert(pCreature1 != NULL); Assert(pCreature2 != NULL); Assert(pCreature1->isNPC()); Assert(pCreature2->isPC()); PlayerCreature* pPC = dynamic_cast<PlayerCreature*>( pCreature2 ); GCWarScheduleList gcWarScheduleList; if ( g_pVariableManager->isWarActive() && makeGCWarScheduleList( &gcWarScheduleList, m_ZoneID ) ) { pPC->getPlayer()->sendPacket( &gcWarScheduleList ); } else { GCNPCResponse gcNPCResponse; gcNPCResponse.setCode( NPC_RESPONSE_QUIT_DIALOGUE ); pPC->getPlayer()->sendPacket( &gcNPCResponse ); } __END_CATCH}////////////////////////////////////////////////////////////////////////////////// get debug string////////////////////////////////////////////////////////////////////////////////string ActionShowWarSchedule::toString () const throw (){ __BEGIN_TRY StringStream msg; msg << "ActionShowWarSchedule(" << ",ZoneID:" << (int)m_ZoneID << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -