mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Add UpdateEntry method for creature. Closes #67
Fix optional arg Fix mangos code
This commit is contained in:
@@ -656,6 +656,19 @@ namespace LuaCreature
|
||||
return 1;
|
||||
}
|
||||
|
||||
int UpdateEntry(lua_State* L, Creature* creature)
|
||||
{
|
||||
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
uint32 dataGuidLow = Eluna::CHECKVAL<uint32>(L, 3, 0);
|
||||
|
||||
#ifdef MANGOS
|
||||
creature->UpdateEntry(entry, ALLIANCE, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL);
|
||||
#else
|
||||
creature->UpdateEntry(entry, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*int ResetLootMode(lua_State* L, Creature* creature) // TODO: Implement LootMode features
|
||||
{
|
||||
creature->ResetLootMode();
|
||||
|
||||
Reference in New Issue
Block a user