Core/Players: Several currency fixes and improvements
Port From (https://github.com/TrinityCore/TrinityCore/commit/03918978c166c9fb191117a0cae9ba1285bf0e37)
This commit is contained in:
@@ -122,7 +122,7 @@ namespace Game.Entities
|
||||
uint count = iece.CurrencyCount[i];
|
||||
uint currencyid = iece.CurrencyID[i];
|
||||
if (count != 0 && currencyid != 0)
|
||||
ModifyCurrency(currencyid, (int)count, true, true);
|
||||
AddCurrency(currencyid, count, CurrencyGainSource.ItemRefund);
|
||||
}
|
||||
|
||||
// Grant back money
|
||||
@@ -2452,7 +2452,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
if (iece.CurrencyID[i] != 0)
|
||||
ModifyCurrency(iece.CurrencyID[i], -(int)(iece.CurrencyCount[i] * stacks), true, true);
|
||||
RemoveCurrency(iece.CurrencyID[i], (int)(iece.CurrencyCount[i] * stacks), CurrencyDestroyReason.Vendor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3178,7 +3178,7 @@ namespace Game.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
ModifyCurrency(currency, (int)count, true, true);
|
||||
AddCurrency(currency, count, CurrencyGainSource.Vendor);
|
||||
if (iece != null)
|
||||
{
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
@@ -3197,7 +3197,7 @@ namespace Game.Entities
|
||||
if (iece.Flags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
ModifyCurrency(iece.CurrencyID[i], -(int)(iece.CurrencyCount[i] * stacks), false, true);
|
||||
RemoveCurrency(iece.CurrencyID[i], (int)(iece.CurrencyCount[i] * stacks), CurrencyDestroyReason.Vendor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user