gm command for reload of eventindex

also i merged both loading functions together
(union-select gameobject and creature)
those loading functions were pretty similar
This commit is contained in:
balrok 2009-09-04 16:19:15 +02:00 committed by balrok
parent 2adf6245c2
commit 0ce6395857
7 changed files with 56 additions and 71 deletions

View file

@ -1468,7 +1468,7 @@ void BattleGround::DoorOpen(uint64 const& guid)
void BattleGround::OnObjectDBLoad(Creature* creature)
{
BattleGroundEventIdx eventId = sBattleGroundMgr.GetCreatureEventIndex(creature->GetDBTableGUIDLow());
const BattleGroundEventIdx eventId = sBattleGroundMgr.GetCreatureEventIndex(creature->GetDBTableGUIDLow());
if (eventId.event1 == BG_EVENT_NONE)
return;
m_EventObjects[MAKE_PAIR32(eventId.event1, eventId.event2)].creatures.push_back(creature->GetGUID());
@ -1479,7 +1479,7 @@ void BattleGround::OnObjectDBLoad(Creature* creature)
void BattleGround::OnObjectDBLoad(GameObject* obj)
{
BattleGroundEventIdx eventId = sBattleGroundMgr.GetGameObjectEventIndex(obj->GetDBTableGUIDLow());
const BattleGroundEventIdx eventId = sBattleGroundMgr.GetGameObjectEventIndex(obj->GetDBTableGUIDLow());
if (eventId.event1 == BG_EVENT_NONE)
return;
m_EventObjects[MAKE_PAIR32(eventId.event1, eventId.event2)].gameobjects.push_back(obj->GetGUID());