📄 zone.h
字号:
//////////////////////////////////////////////////////////////////////////////// FileName : Zone.h// Written By : Reiot// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __ZONE_H__#define __ZONE_H__#include "Types.h"#include "Exception.h"#include "Tile.h"#include "Sector.h"#include "ObjectRegistry.h"#include "Mutex.h"#include "Effect.h"#include "Party.h"#include "PCManager.h"#include "Encrypter.h"#include <queue>#include <vector>#include <hash_map>//////////////////////////////////////////////////////////////////////////////// forward declaration//////////////////////////////////////////////////////////////////////////////class ZoneGroup;class NPC;class NPCManager;class MonsterManager;class PCManager;class Slayer;class MasterLairManager;class WarScheduler;//class EventMonsterManager;class EffectManager;class NPCInfo;class WeatherManager;class Creature;class Vampire;class Monster;class Item;class VampirePortalItem;class EffectVampirePortal;class EffectScheduleManager;class TradeManager;class Motorcycle;class LevelWarManager;//////////////////////////////////////////////////////////////////////////////// 粮狼 鸥涝//////////////////////////////////////////////////////////////////////////////enum ZoneType { ZONE_NORMAL_FIELD, // 老馆 鞘靛 ZONE_NORMAL_DUNGEON, // 老馆 带傈 ZONE_SLAYER_GUILD, // 浇饭捞绢 辨靛 ZONE_RESERVED_SLAYER_GUILD, // ... ZONE_PC_VAMPIRE_LAIR, // PC 轨颇捞绢 饭绢 ZONE_NPC_VAMPIRE_LAIR, // NPC 轨颇捞绢 饭绢 ZONE_NPC_HOME, // ... ZONE_NPC_SHOP, // ... ZONE_RANDOM_MAP, // -_-; ZONE_CASTLE, // 己};//////////////////////////////////////////////////////////////////////////////// 粮狼 立辟葛靛//////////////////////////////////////////////////////////////////////////////enum ZoneAccessMode { PUBLIC = 0, // 酒公唱 甸绢棵 荐 乐绰 粮捞促. PRIVATE // 瘤沥等 荤恩父捞 甸绢棵 荐 乐绰 粮捞促.(辨靛粮,饭绢 殿)};//////////////////////////////////////////////////////////////////////////////// Move type for darkness//////////////////////////////////////////////////////////////////////////////#define INTO_DARKNESS 0#define OUTER_DARKNESS 1#define IN_DARKNESS 2#define OUT_DARKNESS 3////////////////////////////////////////////////////////////////////////////////// class Zone;////////////////////////////////////////////////////////////////////////////////class Zone {public: // constructor & destructor Zone(ZoneID_t zoneID) throw(); Zone(ZoneID_t zoneID, ZoneCoord_t width, ZoneCoord_t height) throw(); ~Zone() throw();public: void init() throw(Error); void load(bool bOutput=false) throw(Error); void reload(bool bOutput=false) throw(Error); void loadItem() throw(Error); void loadTriggeredPortal() throw(Error); void initSpriteCount() throw(Error); void save() throw(Error);public: void pushPC(Creature* pCreature) throw(Error); void addPC(Creature* pCreature, ZoneCoord_t cx, ZoneCoord_t cy, Dir_t dir) throw(EmptyTileNotExistException, Error); void addPC(Creature* pCreature) throw(Error); void addCreature(Creature* pCreature, ZoneCoord_t cx, ZoneCoord_t cy, Dir_t dir) throw(EmptyTileNotExistException, Error); TPOINT addItem(Item* pItem, ZoneCoord_t cx, ZoneCoord_t cy, bool bAllowCreature=true, Turn_t decayTurn=0, ObjectID_t DropPetOID=0) throw(EmptyTileNotExistException, Error); Item* getItem(ObjectID_t id) const throw(Error); void addEffect(Effect* pEffect) throw(Error); void deleteEffect(ObjectID_t id) throw(Error); Effect* findEffect(Effect::EffectClass eid) throw(Error); // by sigi. 2002.5.4 void addEffect_LOCKING(Effect* pEffect) throw(Error); void deleteEffect_LOCKING(ObjectID_t id) throw(Error); void deletePC(Creature* pCreature) throw();//NoSuchElementException, Error); void deleteQueuePC(Creature* pCreature) throw(NoSuchElementException, Error); void deleteCreature(Creature* pCreature, ZoneCoord_t x, ZoneCoord_t y) throw(NoSuchElementException, Error); void deleteObject(Object* pObject, ZoneCoord_t x, ZoneCoord_t y) throw(NoSuchElementException, Error); void deleteItem(Object* pObject, ZoneCoord_t x, ZoneCoord_t y) throw(NoSuchElementException, Error); bool deleteNPC(Creature* pCreature) throw(Error);//NoSuchElementException, Error); void deleteNPCs(Race_t race) throw(Error);//NoSuchElementException, Error); void loadNPCs(Race_t race) throw(Error);//NoSuchElementException, Error); void sendNPCInfo() throw(Error); void loadEffect() throw(Error);public: void movePC(Creature* pCreature, ZoneCoord_t nx, ZoneCoord_t ny, Dir_t dir) throw(ProtocolException, Error); void moveCreature(Creature* pCreature, ZoneCoord_t nx, ZoneCoord_t ny, Dir_t dir) throw(ProtocolException, Error); // 阁胶磐啊 林函阑 胶牡茄促. void monsterScan(Monster* pMonster, ZoneCoord_t x, ZoneCoord_t y, Dir_t dir) throw(Error); void broadcastPacket(Packet* pPacket, Creature* owner = NULL) throw(ProtocolException, Error); void broadcastPacket(ZoneCoord_t x, ZoneCoord_t y, Packet* pPacket, Creature* owner = NULL, bool Plus = false, Range_t Range = 0) throw(ProtocolException, Error); void broadcastPacket(ZoneCoord_t x, ZoneCoord_t y, Packet* pPacket, const list<Creature *> & creatureList, bool Plus = false, Range_t Range = 0) throw(ProtocolException, Error); void broadcastDarkLightPacket(Packet* pPacket1, Packet* pPacket2, Creature* owner = NULL) throw(ProtocolException, Error); void broadcastSayPacket(ZoneCoord_t x, ZoneCoord_t y, Packet* pPacket, Creature* owner = NULL, bool isVampire = false) throw(ProtocolException, Error); void broadcastLevelWarBonusPacket(Packet* pPacket, Creature* owner = NULL) throw(ProtocolException, Error); list<Creature*> broadcastSkillPacket(ZoneCoord_t x1, ZoneCoord_t y1, ZoneCoord_t x2, ZoneCoord_t y2, Packet* pPacket, list<Creature*> creatureList, bool bConcernDarkness = true) throw(ProtocolException, Error); //(x,y) 鸥老 困俊 乐绰 PC 俊霸 林函 沥焊甫 佬绢辑 傈价茄促. pPacket 捞 NULL 捞 酒聪扼搁, 悼矫俊 宏肺靛某胶飘档 淬寸茄促. void scan(Creature* pPC, ZoneCoord_t x, ZoneCoord_t y, Packet* pPacket) throw(ProtocolException, Error); // 力磊府俊辑 矫具啊 函版等 版快 林函 沥焊甫 促矫 焊郴霖促. void updateScan(Creature* pPC, Sight_t oldSight, Sight_t newSight) throw(ProtocolException, Error); // 弊镑阑 杭 荐 乐绰 逞甸(Player)狼 list甫 倒妨霖促.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -