[11951] Unify loot related code and fix engrish.

Also readd the m_groupLootId check in case the StopGroupLoot will be called from other places

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
stfx 2012-04-12 17:06:48 +02:00 committed by Schmoozerd
parent 1c5f99f4b8
commit f153193a02
5 changed files with 16 additions and 15 deletions

View file

@ -1820,13 +1820,14 @@ void GameObject::SetDisplayId(uint32 modelId)
void GameObject::StartGroupLoot(Group* group, uint32 timer)
{
m_groupLootId = group->GetId();
if (m_groupLootId)
m_groupLootTimer = timer;
m_groupLootTimer = timer;
}
void GameObject::StopGroupLoot()
{
if (!m_groupLootId)
return;
if (Group* group = sObjectMgr.GetGroupById(m_groupLootId))
group->EndRoll();