Core/Players: Several currency fixes and improvements
Port From (https://github.com/TrinityCore/TrinityCore/commit/03918978c166c9fb191117a0cae9ba1285bf0e37)
This commit is contained in:
@@ -997,6 +997,52 @@ namespace Framework.Constants
|
||||
Max
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum CurrencyTypesFlags : uint
|
||||
{
|
||||
Tradable = 0x00000001, // NYI
|
||||
AppearsInLootWindow = 0x00000002, // NYI
|
||||
ComputedWeeklyMaximum = 0x00000004, // NYI
|
||||
_100_Scaler = 0x00000008,
|
||||
NoLowLevelDrop = 0x00000010, // NYI
|
||||
IgnoreMaxQtyOnLoad = 0x00000020,
|
||||
LogOnWorldChange = 0x00000040, // NYI
|
||||
TrackQuantity = 0x00000080,
|
||||
ResetTrackedQuantity = 0x00000100, // NYI
|
||||
UpdateVersionIgnoreMax = 0x00000200,
|
||||
SuppressChatMessageOnVersionChange = 0x00000400,
|
||||
SingleDropInLoot = 0x00000800, // NYI
|
||||
HasWeeklyCatchup = 0x00001000, // NYI
|
||||
DoNotCompressChat = 0x00002000, // NYI
|
||||
DoNotLogAcquisitionToBi = 0x00004000, // NYI
|
||||
NoRaidDrop = 0x00008000, // NYI
|
||||
NotPersistent = 0x00010000, // NYI
|
||||
Deprecated = 0x00020000, // NYI
|
||||
DynamicMaximum = 0x00040000,
|
||||
SuppressChatMessages = 0x00080000,
|
||||
DoNotToast = 0x00100000, // NYI
|
||||
DestroyExtraOnLoot = 0x00200000, // NYI
|
||||
DontShowTotalInTooltip = 0x00400000, // NYI
|
||||
DontCoalesceInLootWindow = 0x00800000, // NYI
|
||||
AccountWide = 0x01000000, // NYI
|
||||
AllowOverflowMailer = 0x02000000, // NYI
|
||||
HideAsReward = 0x04000000, // NYI
|
||||
HasWarmodeBonus = 0x08000000, // NYI
|
||||
IsAllianceOnly = 0x10000000,
|
||||
IsHordeOnly = 0x20000000,
|
||||
LimitWarmodeBonusOncePerTooltip = 0x40000000, // NYI
|
||||
DeprecatedCurrencyFlag = 0x80000000 // this flag itself is deprecated, not currency that has it
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum CurrencyTypesFlagsB
|
||||
{
|
||||
UseTotalEarnedForEarned = 0x01,
|
||||
ShowQuestXPGainInTooltip = 0x02, // NYI
|
||||
NoNotificationMailOnOfflineProgress = 0x04, // NYI
|
||||
BattlenetVirtualCurrency = 0x08 // NYI
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum BattlemasterListFlags : int
|
||||
{
|
||||
|
||||
@@ -1282,20 +1282,13 @@ namespace Framework.Constants
|
||||
MawPower = 4
|
||||
}
|
||||
|
||||
public enum CurrencyFlags
|
||||
{
|
||||
Tradeable = 0x01,
|
||||
// ...
|
||||
HighPrecision = 0x08,
|
||||
// ...
|
||||
}
|
||||
|
||||
public enum CurrencyTypes
|
||||
{
|
||||
JusticePoints = 395,
|
||||
ValorPoints = 396,
|
||||
ApexisCrystals = 823,
|
||||
Azerite = 1553
|
||||
Azerite = 1553,
|
||||
AncientMana = 1155
|
||||
}
|
||||
|
||||
public enum PlayerCurrencyState
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,13 +1635,9 @@ namespace Framework.Constants
|
||||
CreatureFamilyFleeDelay,
|
||||
CreaturePickpocketRefill,
|
||||
CreatureStopForPlayer,
|
||||
CurrencyMaxApexisCrystals,
|
||||
CurrencyMaxJusticePoints,
|
||||
CurrencyResetDay,
|
||||
CurrencyResetHour,
|
||||
CurrencyResetInterval,
|
||||
CurrencyStartApexisCrystals,
|
||||
CurrencyStartJusticePoints,
|
||||
DailyQuestResetTimeHour,
|
||||
DbcEnforceItemAttributes,
|
||||
DeathBonesBgOrArena,
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace Framework.Constants
|
||||
ModMoneyGain = 348, // Modifies gold gains from source: [Misc = 0, Quests][Misc = 1, Loot]
|
||||
ModCurrencyGain = 349,
|
||||
Unk350 = 350,
|
||||
ModCurrencyCategoryGainPct = 351, //NYI
|
||||
ModCurrencyCategoryGainPct = 351,
|
||||
Unk352 = 352,
|
||||
ModCamouflage = 353, // Nyi
|
||||
ModHealingDonePctVersusTargetHealth = 354, // Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing)
|
||||
|
||||
@@ -333,9 +333,9 @@ namespace Framework.Database
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
|
||||
// Currency
|
||||
PrepareStatement(CharStatements.SEL_PLAYER_CURRENCY, "SELECT Currency, Quantity, WeeklyQuantity, TrackedQuantity, Flags FROM character_currency WHERE CharacterGuid = ?");
|
||||
PrepareStatement(CharStatements.UPD_PLAYER_CURRENCY, "UPDATE character_currency SET Quantity = ?, WeeklyQuantity = ?, TrackedQuantity = ?, Flags = ? WHERE CharacterGuid = ? AND Currency = ?");
|
||||
PrepareStatement(CharStatements.REP_PLAYER_CURRENCY, "REPLACE INTO character_currency (CharacterGuid, Currency, Quantity, WeeklyQuantity, TrackedQuantity, Flags) VALUES (?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.SEL_PLAYER_CURRENCY, "SELECT Currency, Quantity, WeeklyQuantity, TrackedQuantity, IncreasedCapQuantity, EarnedQuantity, Flags FROM character_currency WHERE CharacterGuid = ?");
|
||||
PrepareStatement(CharStatements.UPD_PLAYER_CURRENCY, "UPDATE character_currency SET Quantity = ?, WeeklyQuantity = ?, TrackedQuantity = ?, IncreasedCapQuantity = ?, EarnedQuantity = ?, Flags = ? WHERE CharacterGuid = ? AND Currency = ?");
|
||||
PrepareStatement(CharStatements.REP_PLAYER_CURRENCY, "REPLACE INTO character_currency (CharacterGuid, Currency, Quantity, WeeklyQuantity, TrackedQuantity, IncreasedCapQuantity, EarnedQuantity, Flags) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.DEL_PLAYER_CURRENCY, "DELETE FROM character_currency WHERE CharacterGuid = ?");
|
||||
|
||||
// Account data
|
||||
|
||||
Reference in New Issue
Block a user