actionsetresurrectzone.cpp

来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 95 行

CPP
95
字号
////////////////////////////////////////////////////////////////////////////////// Filename    : ActionSetResurrectZone.cpp// Written By  : // Description : ////////////////////////////////////////////////////////////////////////////////#include "ActionSetResurrectZone.h"#include "Creature.h"#include "Trigger.h"#include "GamePlayer.h"#include "Slayer.h"#include "Vampire.h"#include "Ousters.h"#include "StringPool.h"#include "Gpackets/GCNPCResponse.h"#include "Gpackets/GCSystemMessage.h"////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////void ActionSetResurrectZone::read (PropertyBuffer & propertyBuffer)    throw (Error){	__BEGIN_TRY	try 	{		m_ZoneID = propertyBuffer.getPropertyInt("ZoneID"); 	}	catch (NoSuchElementException & nsee)	{		throw Error(nsee.toString());	}	__END_CATCH}////////////////////////////////////////////////////////////////////////////////// 咀记阑 角青茄促.////////////////////////////////////////////////////////////////////////////////void ActionSetResurrectZone::execute (Creature * pCreature1 , Creature * pCreature2) 	throw (Error){	__BEGIN_TRY	Assert(pCreature1 != NULL);	Assert(pCreature2 != NULL);	Assert(pCreature1->isNPC());	Assert(pCreature2->isPC());	// 老窜 努扼捞攫飘甫 困秦辑 OK 菩哦阑 窃 朝赴促.	GCNPCResponse okpkt;	Player* pPlayer = pCreature2->getPlayer();	Assert(pPlayer != NULL);	pPlayer->sendPacket(&okpkt);	if (pCreature2->isSlayer())	{		Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature2);		pSlayer->setResurrectZoneIDEx(m_ZoneID);	}	else if (pCreature2->isVampire())	{		Vampire* pVampire = dynamic_cast<Vampire*>(pCreature2);		pVampire->setResurrectZoneIDEx(m_ZoneID);	}	else if (pCreature2->isOusters())	{		Ousters* pOusters = dynamic_cast<Ousters*>(pCreature2);		pOusters->setResurrectZoneIDEx(m_ZoneID);	}	GCSystemMessage msg;	msg.setMessage( g_pStringPool->getString( STRID_SET_RESURRECTION_POSITION ) );	pPlayer->sendPacket(&msg);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////// get debug string////////////////////////////////////////////////////////////////////////////////string ActionSetResurrectZone::toString () const 	throw (){	__BEGIN_TRY	StringStream msg;	msg << "ActionSetResurrectZone(" << ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?