mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
0208c54bc9
commit
1665077dc4
3 changed files with 9 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue