Core/Players: Several currency fixes and improvements

Port From (https://github.com/TrinityCore/TrinityCore/commit/03918978c166c9fb191117a0cae9ba1285bf0e37)
This commit is contained in:
hondacrx
2023-02-11 23:28:57 -05:00
parent 90cc620c11
commit 4b798e7cab
25 changed files with 603 additions and 347 deletions
+108
View File
@@ -60,6 +60,8 @@ namespace Framework.Constants
public const uint WarmodeEnlistedSpellOutside = 269083;
public const uint SpellExperienceEliminated = 206662;
public const uint CurrencyMaxCapAncientMana = 2000;
}
public struct MoneyConstants
@@ -818,4 +820,110 @@ namespace Framework.Constants
RatedPvPReward = 17,
CorruptedLoot = 19
}
[Flags]
public enum CurrencyDbFlags
{
None = 0x00,
IgnoreMaxQtyOnload = 0x01,
Reuse1 = 0x02,
InBackpack = 0x04,
UnusedInUI = 0x08,
Reuse2 = 0x10,
UnusedFlags = (IgnoreMaxQtyOnload | Reuse1 | Reuse2),
ClientFlags = (0x1F & ~UnusedFlags)
}
public enum CurrencyDestroyReason
{
Cheat = 0,
Spell = 1,
VersionUpdate = 2,
QuestTurnin = 3,
Vendor = 4,
Trade = 5,
Capped = 6,
Garrison = 7,
DroppedToCorpse = 8,
BonusRoll = 9,
FactionConversion = 10,
FulfillCraftingOrder = 11,
Last = 12
}
public enum CurrencyGainSource
{
ConvertOldItem = 0,
ConvertOldPvPCurrency = 1,
ItemRefund = 2,
QuestReward = 3,
Cheat = 4,
Vendor = 5,
PvPKillCredit = 6,
PvPMetaCredit = 7,
PvPScriptedAward = 8,
Loot = 9,
UpdatingVersion = 10,
LFGReward = 11,
Trade = 12,
Spell = 13,
ItemDeletion = 14,
RatedBattleground = 15,
RandomBattleground = 16,
Arena = 17,
ExceededMaxQty = 18,
PvPCompletionBonus = 19,
Script = 20,
GuildBankWithdrawal = 21,
Pushloot = 22,
GarrisonBuilding = 23,
PvPDrop = 24,
GarrisonFollowerActivation = 25,
GarrisonBuildingRefund = 26,
GarrisonMissionReward = 27,
GarrisonResourceOverTime = 28,
QuestRewardIgnoreCaps = 29,
GarrisonTalent = 30,
GarrisonWorldQuestBonus = 31,
PvPHonorReward = 32,
BonusRoll = 33,
AzeriteRespec = 34,
WorldQuestReward = 35,
WorldQuestRewardIgnoreCaps = 36,
FactionConversion = 37,
DailyQuestReward = 38,
DailyQuestWarModeReward = 39,
WeeklyQuestReward = 40,
WeeklyQuestWarModeReward = 41,
AccountCopy = 42,
WeeklyRewardChest = 43,
GarrisonTalentTreeReset = 44,
DailyReset = 45,
AddConduitToCollection = 46,
Barbershop = 47,
ConvertItemsToCurrencyValue = 48,
PvPTeamContribution = 49,
Transmogrify = 50,
AuctionDeposit = 51,
PlayerTrait = 52,
PhBuffer_53 = 53,
PhBuffer_54 = 54,
RenownRepGain = 55,
CraftingOrder = 56,
CatalystBalancing = 57,
CatalystCraft = 58,
ProfessionInitialAward = 59,
PlayerTraitRefund = 60,
Last = 61
}
[Flags]
public enum CurrencyGainFlags
{
None = 0x00,
BonusAward = 0x01,
DroppedFromDeath = 0x02,
FromAccountServer = 0x04
}
}