org_x, org_y, org_z, and org_heading converted to xyz_heading as m_SpawnPoint

This commit is contained in:
Arthur Ice 2014-11-30 13:51:57 -08:00
parent 82cc830297
commit 6ffd7203ff
3 changed files with 24 additions and 26 deletions

View File

@ -1800,10 +1800,11 @@ void command_gassign(Client *c, const Seperator *sep)
{ {
if (sep->IsNumber(1) && c->GetTarget() && c->GetTarget()->IsNPC()) if (sep->IsNumber(1) && c->GetTarget() && c->GetTarget()->IsNPC())
{ {
auto npcBind = c->GetTarget()->CastToNPC()->m_SpawnPoint;
database.AssignGrid( database.AssignGrid(
c, c,
(c->GetTarget()->CastToNPC()->org_x), npcBind.m_X,
(c->GetTarget()->CastToNPC()->org_y), npcBind.m_Y,
atoi(sep->arg[1]) atoi(sep->arg[1])
); );
} }

View File

@ -113,7 +113,8 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
qglobal_purge_timer(30000), qglobal_purge_timer(30000),
sendhpupdate_timer(1000), sendhpupdate_timer(1000),
enraged_timer(1000), enraged_timer(1000),
taunt_timer(TauntReuseTime * 1000) taunt_timer(TauntReuseTime * 1000),
m_SpawnPoint(x,y,z,heading)
{ {
//What is the point of this, since the names get mangled.. //What is the point of this, since the names get mangled..
Mob* mob = entity_list.GetMob(name); Mob* mob = entity_list.GetMob(name);
@ -203,9 +204,6 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
MerchantType = d->merchanttype; MerchantType = d->merchanttype;
merchant_open = GetClass() == MERCHANT; merchant_open = GetClass() == MERCHANT;
adventure_template_id = d->adventure_template; adventure_template_id = d->adventure_template;
org_x = x;
org_y = y;
org_z = z;
flymode = iflymode; flymode = iflymode;
guard_x = -1; //just some value we might be able to recongize as "unset" guard_x = -1; //just some value we might be able to recongize as "unset"
guard_y = -1; guard_y = -1;
@ -221,7 +219,6 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
roambox_movingto_y = -2; roambox_movingto_y = -2;
roambox_min_delay = 1000; roambox_min_delay = 1000;
roambox_delay = 1000; roambox_delay = 1000;
org_heading = heading;
p_depop = false; p_depop = false;
loottable_id = d->loottable_id; loottable_id = d->loottable_id;

View File

@ -163,7 +163,7 @@ public:
FACTION_VALUE CheckNPCFactionAlly(int32 other_faction); FACTION_VALUE CheckNPCFactionAlly(int32 other_faction);
virtual FACTION_VALUE GetReverseFactionCon(Mob* iOther); virtual FACTION_VALUE GetReverseFactionCon(Mob* iOther);
void GoToBind(uint8 bindnum = 0) { GMMove(org_x, org_y, org_z, org_heading); } void GoToBind(uint8 bindnum = 0) { GMMove(m_SpawnPoint.m_X, m_SpawnPoint.m_Y, m_SpawnPoint.m_Z, m_SpawnPoint.m_Heading); }
void Gate(); void Gate();
void GetPetState(SpellBuff_Struct *buffs, uint32 *items, char *name); void GetPetState(SpellBuff_Struct *buffs, uint32 *items, char *name);
@ -211,10 +211,10 @@ public:
uint32 GetSp2() const { return spawn_group; } uint32 GetSp2() const { return spawn_group; }
uint32 GetSpawnPointID() const; uint32 GetSpawnPointID() const;
float GetSpawnPointX() const { return org_x; } float GetSpawnPointX() const { return m_SpawnPoint.m_X; }
float GetSpawnPointY() const { return org_y; } float GetSpawnPointY() const { return m_SpawnPoint.m_Y; }
float GetSpawnPointZ() const { return org_z; } float GetSpawnPointZ() const { return m_SpawnPoint.m_Z; }
float GetSpawnPointH() const { return org_heading; } float GetSpawnPointH() const { return m_SpawnPoint.m_Heading; }
float GetGuardPointX() const { return guard_x; } float GetGuardPointX() const { return guard_x; }
float GetGuardPointY() const { return guard_y; } float GetGuardPointY() const { return guard_y; }
float GetGuardPointZ() const { return guard_z; } float GetGuardPointZ() const { return guard_z; }
@ -255,7 +255,7 @@ public:
void SetNPCFactionID(int32 in) { npc_faction_id = in; database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); } void SetNPCFactionID(int32 in) { npc_faction_id = in; database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); }
float org_x, org_y, org_z, org_heading; xyz_heading m_SpawnPoint;
uint32 GetMaxDMG() const {return max_dmg;} uint32 GetMaxDMG() const {return max_dmg;}
uint32 GetMinDMG() const {return min_dmg;} uint32 GetMinDMG() const {return min_dmg;}