[8547] implemented scriptcall: CorpseRemoved(uint32 & /*respawnDelay*/)

it will be called when the corpse of the scripted creature
get's removed,
it's possible to adjust the next respawn inside the script
This commit is contained in:
balrok 2009-09-24 15:21:05 +02:00
parent 0208c54bc9
commit 1665077dc4
3 changed files with 9 additions and 2 deletions

View file

@ -160,7 +160,11 @@ void Creature::RemoveCorpse()
setDeathState(DEAD);
ObjectAccessor::UpdateObjectVisibility(this);
loot.clear();
m_respawnTime = time(NULL) + m_respawnDelay;
uint32 respawnDelay = m_respawnDelay;
if (AI())
AI()->CorpseRemoved(respawnDelay);
m_respawnTime = time(NULL) + respawnDelay;
float x,y,z,o;
GetRespawnCoord(x, y, z, &o);