Core/DataStores: Implemented WorldStateExpression
Port From (https://github.com/TrinityCore/TrinityCore/commit/548d79bb06cfba3517347070dfe606748dda55ab)
This commit is contained in:
@@ -1421,7 +1421,7 @@ namespace Framework.Constants
|
||||
}
|
||||
|
||||
// PhaseUseFlags fields in different db2s
|
||||
public enum PhaseUseFlagsValues : byte
|
||||
public enum PhaseUseFlagsValues : byte
|
||||
{
|
||||
None = 0x0,
|
||||
AlwaysVisible = 0x1,
|
||||
@@ -1819,4 +1819,84 @@ namespace Framework.Constants
|
||||
Micro = 5,
|
||||
Orphan = 6
|
||||
}
|
||||
|
||||
public enum WorldStateExpressionValueType
|
||||
{
|
||||
Constant = 1,
|
||||
WorldState = 2,
|
||||
Function = 3
|
||||
}
|
||||
|
||||
public enum WorldStateExpressionLogic
|
||||
{
|
||||
None = 0,
|
||||
And = 1,
|
||||
Or = 2,
|
||||
Xor = 3,
|
||||
}
|
||||
|
||||
public enum WorldStateExpressionComparisonType
|
||||
{
|
||||
None = 0,
|
||||
Equal = 1,
|
||||
NotEqual = 2,
|
||||
Less = 3,
|
||||
LessOrEqual = 4,
|
||||
Greater = 5,
|
||||
GreaterOrEqual = 6,
|
||||
}
|
||||
|
||||
public enum WorldStateExpressionOperatorType
|
||||
{
|
||||
None = 0,
|
||||
Sum = 1,
|
||||
Substraction = 2,
|
||||
Multiplication = 3,
|
||||
Division = 4,
|
||||
Remainder = 5,
|
||||
}
|
||||
|
||||
public enum WorldStateExpressionFunctions
|
||||
{
|
||||
None = 0,
|
||||
Random,
|
||||
Month,
|
||||
Day,
|
||||
TimeOfDay,
|
||||
Region,
|
||||
ClockHour,
|
||||
OldDifficultyId,
|
||||
HolidayStart,
|
||||
HolidayLeft,
|
||||
HolidayActive,
|
||||
TimerCurrentTime,
|
||||
WeekNumber,
|
||||
Unk13,
|
||||
Unk14,
|
||||
DifficultyId,
|
||||
WarModeActive,
|
||||
Unk17,
|
||||
Unk18,
|
||||
Unk19,
|
||||
Unk20,
|
||||
Unk21,
|
||||
WorldStateExpression,
|
||||
KeystoneAffix,
|
||||
Unk24,
|
||||
Unk25,
|
||||
Unk26,
|
||||
Unk27,
|
||||
KeystoneLevel,
|
||||
Unk29,
|
||||
Unk30,
|
||||
Unk31,
|
||||
Unk32,
|
||||
MersenneRandom,
|
||||
Unk34,
|
||||
Unk35,
|
||||
Unk36,
|
||||
UiWidgetData,
|
||||
|
||||
Max,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,8 +375,8 @@ namespace Framework.Constants
|
||||
Unk7 = 0x80,
|
||||
ContestedPVP = 0x100,
|
||||
InPVP = 0x200,
|
||||
HideHelm = 0x400,
|
||||
HideCloak = 0x800,
|
||||
WarModeActive = 0x400,
|
||||
WarModeDesired = 0x800,
|
||||
PlayedLongTime = 0x1000,
|
||||
PlayedTooLong = 0x2000,
|
||||
IsOutOfBounds = 0x4000,
|
||||
|
||||
@@ -1080,6 +1080,9 @@ namespace Framework.Database
|
||||
// WorldSafeLocs.db2
|
||||
PrepareStatement(HotfixStatements.SEL_WORLD_SAFE_LOCS, "SELECT ID, AreaName, LocX, LocY, LocZ, MapID, Facing FROM world_safe_locs ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE, "SELECT ID, AreaName_lang FROM world_safe_locs_locale WHERE locale = ?");
|
||||
|
||||
// WorldStateExpression.db2
|
||||
PrepareStatement(HotfixStatements.SEL_WORLD_STATE_EXPRESSION, "SELECT ID, Expression FROM world_state_expression ORDER BY ID DESC");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1628,6 +1631,8 @@ namespace Framework.Database
|
||||
SEL_WORLD_SAFE_LOCS,
|
||||
SEL_WORLD_SAFE_LOCS_LOCALE,
|
||||
|
||||
SEL_WORLD_STATE_EXPRESSION,
|
||||
|
||||
MAX_HOTFIXDATABASE_STATEMENTS
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user