encounter events can now watch all events by all npcs/items/quests by registering themselves to watch -1, fix #74

This commit is contained in:
KimLS
2013-06-22 14:23:07 -07:00
parent 2529a7700e
commit bb1282de30
9 changed files with 202 additions and 116 deletions
+15 -17
View File
@@ -29,15 +29,7 @@
#include "zonedbasync.h"
#include "QGlobals.h"
// max number of newspawns to send per bulk packet
#define SPAWNS_PER_POINT_DATARATE 10
#define MAX_SPAWNS_PER_PACKET 100
//#ifdef _WINDOWS
class EQApplicationPacket;
//#else
// struct EQApplicationPacket;
//#endif
class EQApplicationPacket;
class Client;
class Mob;
@@ -61,8 +53,6 @@ class BotRaids;
extern EntityList entity_list;
void ProcessClientThreadSpawn(void *tmp);
class Entity
{
public:
@@ -77,7 +67,6 @@ public:
virtual bool IsPlayerCorpse() const { return false; }
virtual bool IsNPCCorpse() const { return false; }
virtual bool IsObject() const { return false; }
// virtual bool IsGroup() const { return false; }
virtual bool IsDoor() const { return false; }
virtual bool IsTrap() const { return false; }
virtual bool IsBeacon() const { return false; }
@@ -102,7 +91,6 @@ public:
const Merc* CastToMerc() const;
const Corpse* CastToCorpse() const;
const Object* CastToObject() const;
// const Group* CastToGroup() const;
const Doors* CastToDoors() const;
const Trap* CastToTrap() const;
const Beacon* CastToBeacon() const;
@@ -129,6 +117,14 @@ private:
class EntityList
{
public:
struct Area {
int id;
int type;
float min_x, max_x;
float min_y, max_y;
float min_z, max_z;
};
EntityList();
~EntityList();
@@ -181,8 +177,6 @@ public:
void SendGuildMembers(uint32 guild_id);
void RefreshAllGuildInfo(uint32 guild_id);
void SendGuildList();
// void SendGuildJoin(GuildJoin_Struct* gj);
// Check group list for nullptr entries
void CheckGroupList (const char *fname, const int fline);
void GroupProcess();
void RaidProcess();
@@ -193,6 +187,10 @@ public:
void TrapProcess();
void BeaconProcess();
void ProcessMove(Client *c, float x, float y, float z);
void ProcessMove(NPC *n, float x, float y, float z);
void AddArea(int id, int type, float x1, float x2, float y1, float y2, float z1, float z2);
void RemoveArea(int id);
void ClearAreas();
void ProcessProximitySay(const char *Message, Client *c, uint8 language = 0);
void SendAATimer(uint32 charid,UseAA_Struct* uaa);
Doors* FindDoor(uint8 door_id);
@@ -249,7 +247,6 @@ public:
Entity* GetEntityObject(uint16 id);
Entity* GetEntityCorpse(uint16 id);
Entity* GetEntityCorpse(const char *name);
// Entity* GetEntityGroup(uint32 id);
Entity* GetEntityTrap(uint16 id);
Entity* GetEntityBeacon(uint16 id);
@@ -430,8 +427,9 @@ private:
LinkedList<Doors*> door_list;
LinkedList<Trap*> trap_list;
LinkedList<Beacon*> beacon_list;
LinkedList<NPC *> proximity_list;
std::list<NPC*> proximity_list;
std::list<Raid *> raid_list;
std::list<Area> area_list;
uint16 last_insert_id;
// Please Do Not Declare Any EntityList Class Members After This Comment