📄 effectcallmotorcycle.cpp
字号:
//----------------------------------------------------------------------//// Filename : EffectCallMotorcycle.cpp// Written by : Reiot////----------------------------------------------------------------------// include files#include "Assert.h"#include "EffectCallMotorcycle.h"#include "Gpackets/GCDeleteObject.h"#include "Tile.h"#include "Zone.h"#include "Item.h"#include "ZoneUtil.h"//----------------------------------------------------------------------// constructor//----------------------------------------------------------------------EffectCallMotorcycle::EffectCallMotorcycle (Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Item* pItem , Turn_t delay, bool bDeleteFromDB) throw (Error): Effect(pZone,x,y,pItem,delay) { __BEGIN_TRY Assert(getZone() != NULL); Assert(getTarget() != NULL); //m_ObjectID = pItem->getObjectID(); m_ObjectID = pItem->getObjectID(); m_bDeleteFromDB = bDeleteFromDB; // 辑滚 傈侩 Effect捞促. by sigi. 2002.11.14 m_bBroadcastingEffect = false; __END_CATCH}//----------------------------------------------------------------------// destructor//----------------------------------------------------------------------EffectCallMotorcycle::~EffectCallMotorcycle () throw (Error){ __BEGIN_TRY unaffect(m_pZone , m_X , m_Y , m_pTarget); __END_CATCH} //----------------------------------------------------------------------// affect to target// 捞 捞棋飘绰 鸥老俊 辆加登瘤 臼栏骨肺, affect()绰 龋免登瘤 臼绰促.// 恐衬窍搁, target篮 积己磊俊辑 瘤沥登哥, 酒公繁 老档 窍瘤 臼扁 锭巩捞促.//----------------------------------------------------------------------void EffectCallMotorcycle::affect (Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pTarget) throw (Error){ __BEGIN_TRY// throw UnsupportedError(); __END_CATCH}//----------------------------------------------------------------------// remove effect from target//----------------------------------------------------------------------void EffectCallMotorcycle::unaffect (Motorcycle* pMotorcycle, Slayer* pSlayer) throw (Error){ __BEGIN_TRY // Slayer狼 沥焊(Zone, x, y)甫 备茄促. Zone* pZone = pSlayer->getZone(); Coord_t x = pSlayer->getX(); Coord_t y = pSlayer->get(); // Slayer狼 沥焊啊 蜡瓤茄瘤 八荤茄促. // 粮狼 鸥老 沥焊甫 啊廉柯促. Tile & tile = pZone->getTile(x, y); // 父距 秦寸 粮俊 酒捞袍捞 乐促搁?? if(tile.hasItem()) { } else { pZone->addItem(pMotorcycle, x, y); // 酒捞袍捞 捞悼沁促绰 菩哦阑 朝赴促. } __END_CATCH}//----------------------------------------------------------------------// unaffect()//----------------------------------------------------------------------void EffectCallMotorcycle::unaffect () throw (Error){ __BEGIN_TRY __END_CATCH}//----------------------------------------------------------------------// unaffect()//----------------------------------------------------------------------void EffectCallMotorcycle::unaffect (Creature* pCreature) throw (Error){ __BEGIN_TRY __END_CATCH}//----------------------------------------------------------------------// get debug string//----------------------------------------------------------------------string EffectCallMotorcycle::toString () const throw (){ StringStream msg; msg << "EffectCallMotorcycle(" << "ZoneID:" << (int)m_pZone->getZoneID() << ",X:" << (int)getX() << ",Y:" << (int)getY(); if (m_pTarget) msg << ",Target:" << m_pTarget->toString(); else msg << ",Target:NULL"; msg << ",Deadline:" << (int)m_Deadline.tv_sec << "." << (int)m_Deadline.tv_usec; msg << ")"; return msg.toString();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -