Core/Loot: Move loot rolls from Group to Loot
Port From (https://github.com/TrinityCore/TrinityCore/commit/3ef5079feeedfdafc9d3c1d9f865e96dbc77ecc8)
This commit is contained in:
@@ -362,22 +362,14 @@ namespace Game
|
||||
if (player.GetGUID() == loot.roundRobinPlayer)
|
||||
{
|
||||
loot.roundRobinPlayer.Clear();
|
||||
|
||||
Group group = player.GetGroup();
|
||||
if (group)
|
||||
{
|
||||
if (group.GetLootMethod() != LootMethod.MasterLoot)
|
||||
group.SendLooter(creature, null);
|
||||
}
|
||||
// force dynflag update to update looter and lootable info
|
||||
creature.m_values.ModifyValue(creature.m_objectData).ModifyValue(creature.m_objectData.DynamicFlags);
|
||||
creature.ForceUpdateFieldChange();
|
||||
loot.NotifyLootList(creature.GetMap());
|
||||
}
|
||||
|
||||
// force dynflag update to update looter and lootable info
|
||||
creature.m_values.ModifyValue(creature.m_objectData).ModifyValue(creature.m_objectData.DynamicFlags);
|
||||
creature.ForceUpdateFieldChange();
|
||||
}
|
||||
}
|
||||
|
||||
//Player is not looking at loot list, he doesn't need to see updates on the loot list
|
||||
loot.RemoveLooter(player.GetGUID());
|
||||
}
|
||||
|
||||
public void DoLootReleaseAll()
|
||||
@@ -466,6 +458,16 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.LootRoll)]
|
||||
void HandleLootRoll(LootRollPacket packet)
|
||||
{
|
||||
LootRoll lootRoll = GetPlayer().GetLootRoll(packet.LootObj, (byte)(packet.LootListID - 1));
|
||||
if (lootRoll == null)
|
||||
return;
|
||||
|
||||
lootRoll.PlayerVote(GetPlayer(), packet.RollType);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SetLootSpecialization)]
|
||||
void HandleSetLootSpecialization(SetLootSpecialization packet)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user