Add UpdateEntry method for creature. Closes #67

Fix optional arg

Fix mangos code
This commit is contained in:
Rochet2
2014-06-19 13:10:53 +03:00
committed by Foereaper
parent aa96c42eb0
commit 98aa2d18ef
2 changed files with 14 additions and 0 deletions

View File

@@ -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();