[9113] Add helper functions to set/getSummonLocation

This should help the poor homeless that does not have a database defined home at evade (such as "wild summon" without owner).

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-01-05 19:55:43 +01:00
parent 9bc219a312
commit 7e1d55c38e
4 changed files with 21 additions and 10 deletions

View file

@ -1826,22 +1826,23 @@ void Creature::GetRespawnCoord( float &x, float &y, float &z, float* ori, float*
x = data->posX;
y = data->posY;
z = data->posZ;
if(ori)
if (ori)
*ori = data->orientation;
if(dist)
if (dist)
*dist = data->spawndist;
return;
}
}
x = GetPositionX();
y = GetPositionY();
z = GetPositionZ();
if(ori)
*ori = GetOrientation();
if(dist)
*dist = 0;
float orient;
GetSummonPoint(x, y, z, orient);
if (ori)
*ori = orient;
if (dist)
*dist = GetRespawnRadius();
}
void Creature::AllLootRemovedFromCorpse()