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:
Spp
2013-01-09 15:15:42 +01:00
parent ecfb762346
commit 677ed18080
13 changed files with 267 additions and 252 deletions

View File

@@ -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)