feat(CreatureMethods): Add GetCreatureSpawnId and SetCorpseDelay methods (#300)
This commit is contained in:
@@ -434,6 +434,17 @@ namespace LuaCreature
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the spawn ID for this [Creature].
|
||||
*
|
||||
* @return uint32 spawnId
|
||||
*/
|
||||
int GetSpawnId(lua_State* L, Creature* creature)
|
||||
{
|
||||
Eluna::Push(L, creature->GetSpawnId());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default movement type for this [Creature].
|
||||
*
|
||||
@@ -1134,6 +1145,18 @@ namespace LuaCreature
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the time it takes for the [Creature]'s corpse to despawn when killed.
|
||||
*
|
||||
* @param uint32 delay : the delay, in seconds
|
||||
*/
|
||||
int SetCorpseDelay(lua_State* L, Creature* creature)
|
||||
{
|
||||
uint32 delay = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
creature->SetCorpseDelay(delay);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the [Creature] start following its waypoint path.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user