Groups are now stored by low guid in map

Creatures and gameobjects also store looting group by low guid instead of full guid

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-08-02 17:28:47 +02:00
parent 21db4757a9
commit 46c1a4640d
10 changed files with 36 additions and 52 deletions
@@ -63,7 +63,7 @@ GameObject::GameObject() : WorldObject(), m_goValue(new GameObjectValue)
m_rotation = 0;
m_groupLootTimer = 0;
lootingGroupGUID = 0;
lootingGroupLowGUID = 0;
ResetLootMode(); // restore default loot mode
}
@@ -444,11 +444,11 @@ void GameObject::Update(uint32 diff)
{
if (m_groupLootTimer <= diff)
{
Group* group = objmgr.GetGroupByGUID(lootingGroupGUID);
Group* group = objmgr.GetGroupByGUID(lootingGroupLowGUID);
if (group)
group->EndRoll(&loot);
m_groupLootTimer = 0;
lootingGroupGUID = 0;
lootingGroupLowGUID = 0;
}
else m_groupLootTimer -= diff;
}