aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Creature
diff options
context:
space:
mode:
authormegamage <none@none.none>2011-10-18 10:53:34 -0400
committermegamage <none@none.none>2011-10-18 10:53:34 -0400
commitc29ff410015be2ef8c8c55ba3015940962ff56c3 (patch)
treed2b5b36bbf32bbb695ef0f1456a461294609fd06 /src/server/game/Entities/Creature
parente3f8588a227cbf9108f396131a199d75868bf539 (diff)
Rename some classes in grid system.
Note: The naming of classes is still confusing. "cell" usually refers to class "Grid", and "grid" usually refers to class "NGrid". But it requires a lot of changes to clean this up.
Diffstat (limited to 'src/server/game/Entities/Creature')
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp14
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index f9930fd47c7..a4dfe76dd21 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -245,7 +245,7 @@ void Creature::RemoveCorpse(bool setSpawnTime)
m_respawnTime = time(NULL) + respawnDelay;
float x, y, z, o;
- GetRespawnCoord(x, y, z, &o);
+ GetRespawnPosition(x, y, z, &o);
SetHomePosition(x, y, z, o);
GetMap()->CreatureRelocation(this, x, y, z, o);
}
@@ -659,7 +659,7 @@ void Creature::DoFleeToGetAssistance()
{
Creature* creature = NULL;
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -1760,7 +1760,7 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* pVictim)
// select nearest hostile unit within the given distance (regardless of threat list).
Unit* Creature::SelectNearestTarget(float dist) const
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -1787,7 +1787,7 @@ Unit* Creature::SelectNearestTarget(float dist) const
// select nearest hostile unit within the given attack distance (i.e. distance is ignored if > than ATTACK_DISTANCE), regardless of threat list.
Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -1850,7 +1850,7 @@ void Creature::CallAssistance()
std::list<Creature*> assistList;
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -1883,7 +1883,7 @@ void Creature::CallForHelp(float fRadius)
if (fRadius <= 0.0f || !getVictim() || isPet() || isCharmed())
return;
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
@@ -2205,7 +2205,7 @@ time_t Creature::GetRespawnTimeEx() const
return now;
}
-void Creature::GetRespawnCoord(float &x, float &y, float &z, float* ori, float* dist) const
+void Creature::GetRespawnPosition(float &x, float &y, float &z, float* ori, float* dist) const
{
if (m_DBTableGuid)
{
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 5a3c80234d8..9f5d8ec202e 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -456,7 +456,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
void Update(uint32 time); // overwrited Unit::Update
- void GetRespawnCoord(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
+ void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
uint32 GetEquipmentId() const { return GetCreatureInfo()->equipmentId; }
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }