📄 actionactivatemazeexit.cpp
字号:
////////////////////////////////////////////////////////////////////////////////// Filename : ActionActivateMazeExit.cpp// Written By : // Description :////////////////////////////////////////////////////////////////////////////////#include "ActionActivateMazeExit.h"#include "Zone.h"#include "ZoneGroup.h"#include "ZoneGroupManager.h"#include "ZoneInfo.h"#include "ZoneInfoManager.h"#include "ZonePlayerManager.h"#include "PCSlayerInfo2.h"#include "PCVampireInfo2.h"#include "Slayer.h"#include "Vampire.h"#include "WeatherManager.h"#include "PaySystem.h"#include "GamePlayer.h"#include "IncomingPlayerManager.h"#include "LogClient.h"#include "PacketUtil.h"#include "ZoneUtil.h"#include "Properties.h"#include "EffectRefiniumTicket.h"#include "PlayerCreature.h"#include "Gpackets/GCUpdateInfo.h"#include "Gpackets/GCMoveOK.h"#include "Gpackets/GCSystemMessage.h"#include "Gpackets/GCNPCResponse.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void ActionActivateMazeExit::read (PropertyBuffer & pb) throw (Error){ __BEGIN_TRY try { m_GoodZoneID = pb.getPropertyInt("GoodZoneID"); m_GoodX = pb.getPropertyInt("GoodX"); m_GoodY = pb.getPropertyInt("GoodY"); m_BadZoneID = pb.getPropertyInt("BadZoneID"); m_BadX = pb.getPropertyInt("BadX"); m_BadY = pb.getPropertyInt("BadY"); m_ExitID = pb.getPropertyInt("ExitID"); } catch (NoSuchElementException & nsee) { throw Error(nsee.toString()); } __END_CATCH}////////////////////////////////////////////////////////////////////////////////// 咀记阑 角青茄促.////////////////////////////////////////////////////////////////////////////////void ActionActivateMazeExit::execute (Creature * pNPC , Creature * pCreature) throw (Error){ __BEGIN_TRY __BEGIN_DEBUG Assert(pCreature != NULL); Assert(pCreature->isPC()); // 固肺 免备绰 蜡丰粮 眉农 救窍绊 焊郴霖促. 哩厘 -_- PlayerCreature* pPC = dynamic_cast<PlayerCreature*>(pCreature); Assert( pPC != NULL ); bool isCorrect = false; if ( !pPC->isFlag( Effect::EFFECT_CLASS_REFINIUM_TICKET ) ) { filelog("EventBug.log", "固肺 救俊 乐绰单 府乔唇 萍南捞 绝绢. 肺弊酒眶窍绰荐观俊.. : %s", pPC->getName().c_str()); } else { EffectRefiniumTicket* pEffect = dynamic_cast<EffectRefiniumTicket*>(pPC->findEffect( Effect::EFFECT_CLASS_REFINIUM_TICKET )); if ( pEffect != NULL ) { isCorrect = ((int)pEffect->getExit() == (int)m_ExitID); if ( isCorrect ) pEffect->setDeadline(0); else { pEffect->setPrevExitZoneID( pPC->getZoneID() ); pEffect->setPrevExitX( pPC->getX() ); pEffect->setPrevExitY( pPC->getY() ); } } } if (isCorrect) { transportCreature(pCreature, m_GoodZoneID, m_GoodX, m_GoodY, true); } else { transportCreature(pCreature, m_BadZoneID, m_BadX, m_BadY, true); } __END_DEBUG __END_CATCH}////////////////////////////////////////////////////////////////////////////////// get debug string////////////////////////////////////////////////////////////////////////////////string ActionActivateMazeExit::toString () const throw (){ __BEGIN_TRY StringStream msg; msg << "ActionActivateMazeExit(" << "GoodZoneID:" << (int)m_GoodZoneID << ",GoodX:" << (int)m_GoodX << ",GoodY:" << (int)m_GoodY << ",BadZoneID:" << (int)m_BadZoneID << ",BadX:" << (int)m_BadX << ",BadY:" << (int)m_BadY << ",ExitID:" << (int)m_ExitID << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -