mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Dungeon Finder: Fix group (5) unable to do new dungeon after finished last dungeon
- Some optimizations here and there - Drop unused columns related to dungeon rewards - Simplify Group reward. All people inside the dungeon should get the reward, no matter how far it's from the boss
This commit is contained in:
@@ -29,6 +29,7 @@ EndScriptData */
|
||||
#include "scarlet_monastery.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Group.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
//this texts are already used by 3975 and 3976
|
||||
@@ -576,10 +577,7 @@ public:
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
if (Player* player = i->getSource())
|
||||
if (player->IsAtGroupRewardDistance(me))
|
||||
sLFGMgr->RewardDungeonDoneFor(285, player);
|
||||
sLFGMgr->FinishDungeon(players.begin()->getSource()->GetGroup()->GetGUID(), 285);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell)
|
||||
|
||||
Reference in New Issue
Block a user