Core/Loot: Move loot rolls from Group to Loot

* Partial port of cmangos/mangos-wotlk@ffdf9a05d6
This commit is contained in:
Shauren
2022-09-16 16:58:03 +02:00
parent 9700b2a786
commit 3ef5079fee
27 changed files with 818 additions and 976 deletions

View File

@@ -21,7 +21,7 @@
#include "Group.h"
#include "GroupMgr.h"
#include "Log.h"
#include "LootPackets.h"
#include "Loot.h"
#include "MiscPackets.h"
#include "ObjectAccessor.h"
#include "PartyPackets.h"
@@ -398,25 +398,6 @@ void WorldSession::HandleSetLootMethodOpcode(WorldPackets::Party::SetLootMethod&
group->SendUpdate();
}
void WorldSession::HandleLootRoll(WorldPackets::Loot::LootRoll& packet)
{
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
group->CountRollVote(GetPlayer()->GetGUID(), packet.LootObj, packet.LootListID - 1, packet.RollType);
switch (packet.RollType)
{
case ROLL_NEED:
GetPlayer()->UpdateCriteria(CriteriaType::RollAnyNeed, 1);
break;
case ROLL_GREED:
GetPlayer()->UpdateCriteria(CriteriaType::RollAnyGreed, 1);
break;
}
}
void WorldSession::HandleMinimapPingOpcode(WorldPackets::Party::MinimapPingClient& packet)
{
if (!GetPlayer()->GetGroup())