diff options
| author | Subv2112 <s.v.h.21@hotmail.com> | 2012-01-14 17:37:28 +0100 |
|---|---|---|
| committer | Machiavelli <machiavelli.trinity@gmail.com> | 2012-01-14 17:37:28 +0100 |
| commit | f4075f0f945c842fe2b1a08ea4a7fa253e8e2e53 (patch) | |
| tree | be27baca490ad8088774a2f7e7c20c319a766b01 /src/server/scripts/Spells | |
| parent | dbbac0bdaae4b6d8a0125999962c4a686092bd80 (diff) | |
Core/LFG:
Fix priority of the player when its added to the lfg group
Better implementation of the Dungeon Deserter debuff
Rewrite the NeedBeforeGreed loot
Fixed players being shown as Unknown Entity when entering the lfg group
Some incremental optimizations after original patch
Thanks to Retriman and Paecman for base implementation
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 38e5771ccca..3fb2c4f3319 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1445,7 +1445,17 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader if (GetUnitOwner()->GetTypeId() != TYPEID_PLAYER) return; - LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID()).begin())); + const LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID()); + LfgDungeonSet::const_iterator itr = dungeons.begin(); + + if (itr == dungeons.end()) + { + Remove(AURA_REMOVE_BY_DEFAULT); + return; + } + + + LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*itr); Group* group = GetUnitOwner()->ToPlayer()->GetGroup(); Map const* map = GetUnitOwner()->GetMap(); if (group && group->isLFGGroup()) |
