Compare commits
No commits in common. "a45716243943ff1f9fb05c18243d13ba45bad433" and "f69bff1cfa4048a61bff9b53ce5054506005052a" have entirely different histories.
a457162439
...
f69bff1cfa
1 changed files with 2 additions and 8 deletions
|
|
@ -5,9 +5,6 @@
|
||||||
|
|
||||||
void GuildFunds::OnLootMoney(Player* player, uint32 gold)
|
void GuildFunds::OnLootMoney(Player* player, uint32 gold)
|
||||||
{
|
{
|
||||||
if (LootMultiplier < 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (Group* group = player->GetGroup())
|
if (Group* group = player->GetGroup())
|
||||||
{
|
{
|
||||||
uint32 membersInRange = 0;
|
uint32 membersInRange = 0;
|
||||||
|
|
@ -20,10 +17,7 @@ void GuildFunds::OnLootMoney(Player* player, uint32 gold)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Guard the division. In practice the looter counts themselves, but a group whose
|
if (LootMultiplier < 1)
|
||||||
// members all fail the distance check would divide by zero and take worldserver
|
|
||||||
// down with SIGFPE.
|
|
||||||
if (!membersInRange)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 money = (gold / membersInRange) * LootMultiplier / 100;
|
uint32 money = (gold / membersInRange) * LootMultiplier / 100;
|
||||||
|
|
@ -55,7 +49,7 @@ void GuildFunds::OnLootMoney(Player* player, uint32 gold)
|
||||||
{
|
{
|
||||||
uint32 money = gold * LootMultiplier / 100;
|
uint32 money = gold * LootMultiplier / 100;
|
||||||
|
|
||||||
if (money < 1)
|
if (money < 1 || LootMultiplier < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
guild->HandleMemberDepositMoney(player->GetSession(), money);
|
guild->HandleMemberDepositMoney(player->GetSession(), money);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue