Messed up the commit history, so here is all the files rip, Credit to TrinityCore
This commit is contained in:
@@ -38,24 +38,24 @@ namespace BNetServer
|
||||
}
|
||||
|
||||
_hostnames[0] = ConfigMgr.GetDefaultValue("LoginREST.ExternalAddress", "127.0.0.1");
|
||||
var externalAddress = Dns.GetHostEntry($"{_hostnames[0]}:{_port}", System.Net.Sockets.AddressFamily.InterNetwork);
|
||||
if (externalAddress == null || externalAddress.AddressList.Empty())
|
||||
var externalAddress = Dns.GetHostAddresses(_hostnames[0], System.Net.Sockets.AddressFamily.InterNetwork);
|
||||
if (externalAddress == null || externalAddress.Empty())
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Could not resolve LoginREST.ExternalAddress {_hostnames[0]}");
|
||||
return;
|
||||
}
|
||||
|
||||
_addresses[0] = externalAddress.AddressList[0];
|
||||
_addresses[0] = externalAddress[0];
|
||||
|
||||
_hostnames[1] = ConfigMgr.GetDefaultValue("LoginREST.LocalAddress", "127.0.0.1");
|
||||
var localAddress = Dns.GetHostEntry($"{_hostnames[1]}:{_port}", System.Net.Sockets.AddressFamily.InterNetwork);
|
||||
if (localAddress == null || localAddress.AddressList.Empty())
|
||||
var localAddress = Dns.GetHostAddresses(_hostnames[1], System.Net.Sockets.AddressFamily.InterNetwork);
|
||||
if (localAddress == null || localAddress.Empty())
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Could not resolve LoginREST.ExternalAddress {_hostnames[1]}");
|
||||
return;
|
||||
}
|
||||
|
||||
_addresses[1] = localAddress.AddressList[0];
|
||||
_addresses[1] = localAddress[0];
|
||||
|
||||
// set up form inputs
|
||||
formInputs.Type = "LOGIN_FORM";
|
||||
|
||||
@@ -2050,14 +2050,14 @@ namespace Framework.Constants
|
||||
DontDismissWhenEncounterIsAborted = 0x80000000 // NYI
|
||||
}
|
||||
|
||||
public enum TaxiNodeFlags : ushort
|
||||
public enum TaxiNodeFlags : int
|
||||
{
|
||||
Alliance = 0x1,
|
||||
Horde = 0x2,
|
||||
UseFavoriteMount = 0x10
|
||||
}
|
||||
|
||||
public enum TaxiPathNodeFlags : byte
|
||||
public enum TaxiPathNodeFlags : int
|
||||
{
|
||||
Teleport = 0x1,
|
||||
Stop = 0x2
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Framework.Constants
|
||||
EveryoneAssistant = 0x040, // Script_IsEveryoneAssistant()
|
||||
GuildGroup = 0x100,
|
||||
CrossFaction = 0x200,
|
||||
RestrictPings = 0x400,
|
||||
|
||||
MaskBgRaid = FakeRaid | Raid
|
||||
}
|
||||
@@ -153,4 +154,16 @@ namespace Framework.Constants
|
||||
|
||||
Max
|
||||
}
|
||||
|
||||
public enum PingSubjectType
|
||||
{
|
||||
Attack = 0,
|
||||
Warning = 1,
|
||||
Assist = 2,
|
||||
OnMyWay = 3,
|
||||
AlertThreat = 4,
|
||||
AlertNotThreat = 5,
|
||||
|
||||
Max
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1274,6 +1274,7 @@ namespace Framework.Constants
|
||||
ReagentBagWrongSlot = 115,// Reagent Bags can only be placed in the reagent bag slot.
|
||||
SlotOnlyReagentBag = 116,// Only Reagent Bags can be placed in the reagent bag slot.
|
||||
ReagentBagItemType = 117,// Only Reagents can be placed in Reagent Bags.
|
||||
CantBulkSellItemWithRefund = 118// Items that can be refunded can't be bulk sold.
|
||||
}
|
||||
|
||||
public enum BuyResult
|
||||
@@ -1297,7 +1298,10 @@ namespace Framework.Constants
|
||||
YouDontOwnThatItem = 4, // You don't own that item.
|
||||
Unk = 5, // Nothing Appears...
|
||||
OnlyEmptyBag = 6, // You can only do that with empty bags.
|
||||
CantSellToThisMerchant = 7 // You cannot sell items to this merchant.
|
||||
CantSellToThisMerchant = 7, // You cannot sell items to this merchant.
|
||||
MustRepairDurability = 8, // DESCRIPTION You must repair that item's durability to use it.
|
||||
VendorRefuseScappableAzerite = 9, // DESCRIPTION The merchant doesn't want that item. Bring it to the Scrapper to extract Titan Residuum.
|
||||
InternalBagError = 10, // DESCRIPTION Internal Bag Error
|
||||
}
|
||||
|
||||
public enum EnchantmentSlot
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -71,4 +71,11 @@ namespace Framework.Constants
|
||||
//Apply,
|
||||
//Remove
|
||||
}
|
||||
|
||||
public enum EncounterType
|
||||
{
|
||||
DungeonEncounter,
|
||||
Battleground,
|
||||
MythicPlusRun
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2654,363 +2654,365 @@ namespace Framework.Constants
|
||||
BattlegroundJoinNoValidSpecForRole = 764,
|
||||
BattlegroundJoinRespec = 765,
|
||||
BattlegroundInvitationDeclined = 766,
|
||||
BattlegroundJoinTimedOut = 767,
|
||||
BattlegroundDupeQueue = 768,
|
||||
BattlegroundJoinMustCompleteQuest = 769,
|
||||
InBattlegroundRespec = 770,
|
||||
MailLimitedDurationItem = 771,
|
||||
YellRestrictedTrial = 772,
|
||||
ChatRaidRestrictedTrial = 773,
|
||||
LfgRoleCheckFailed = 774,
|
||||
LfgRoleCheckFailedTimeout = 775,
|
||||
LfgRoleCheckFailedNotViable = 776,
|
||||
LfgReadyCheckFailed = 777,
|
||||
LfgReadyCheckFailedTimeout = 778,
|
||||
LfgGroupFull = 779,
|
||||
LfgNoLfgObject = 780,
|
||||
LfgNoSlotsPlayer = 781,
|
||||
LfgNoSlotsParty = 782,
|
||||
LfgNoSpec = 783,
|
||||
LfgMismatchedSlots = 784,
|
||||
LfgMismatchedSlotsLocalXrealm = 785,
|
||||
LfgPartyPlayersFromDifferentRealms = 786,
|
||||
LfgMembersNotPresent = 787,
|
||||
LfgGetInfoTimeout = 788,
|
||||
LfgInvalidSlot = 789,
|
||||
LfgDeserterPlayer = 790,
|
||||
LfgDeserterParty = 791,
|
||||
LfgDead = 792,
|
||||
LfgRandomCooldownPlayer = 793,
|
||||
LfgRandomCooldownParty = 794,
|
||||
LfgTooManyMembers = 795,
|
||||
LfgTooFewMembers = 796,
|
||||
LfgProposalFailed = 797,
|
||||
LfgProposalDeclinedSelf = 798,
|
||||
LfgProposalDeclinedParty = 799,
|
||||
LfgNoSlotsSelected = 800,
|
||||
LfgNoRolesSelected = 801,
|
||||
LfgRoleCheckInitiated = 802,
|
||||
LfgReadyCheckInitiated = 803,
|
||||
LfgPlayerDeclinedRoleCheck = 804,
|
||||
LfgPlayerDeclinedReadyCheck = 805,
|
||||
LfgJoinedQueue = 806,
|
||||
LfgJoinedFlexQueue = 807,
|
||||
LfgJoinedRfQueue = 808,
|
||||
LfgJoinedScenarioQueue = 809,
|
||||
LfgJoinedWorldPvpQueue = 810,
|
||||
LfgJoinedBattlefieldQueue = 811,
|
||||
LfgJoinedList = 812,
|
||||
LfgLeftQueue = 813,
|
||||
LfgLeftList = 814,
|
||||
LfgRoleCheckAborted = 815,
|
||||
LfgReadyCheckAborted = 816,
|
||||
LfgCantUseBattleground = 817,
|
||||
LfgCantUseDungeons = 818,
|
||||
LfgReasonTooManyLfg = 819,
|
||||
LfgFarmLimit = 820,
|
||||
LfgNoCrossFactionParties = 821,
|
||||
InvalidTeleportLocation = 822,
|
||||
TooFarToInteract = 823,
|
||||
BattlegroundPlayersFromDifferentRealms = 824,
|
||||
DifficultyChangeCooldownS = 825,
|
||||
DifficultyChangeCombatCooldownS = 826,
|
||||
DifficultyChangeWorldstate = 827,
|
||||
DifficultyChangeEncounter = 828,
|
||||
DifficultyChangeCombat = 829,
|
||||
DifficultyChangePlayerBusy = 830,
|
||||
DifficultyChangePlayerOnVehicle = 831,
|
||||
DifficultyChangeAlreadyStarted = 832,
|
||||
DifficultyChangeOtherHeroicS = 833,
|
||||
DifficultyChangeHeroicInstanceAlreadyRunning = 834,
|
||||
ArenaTeamPartySize = 835,
|
||||
SoloShuffleWargameGroupSize = 836,
|
||||
SoloShuffleWargameGroupComp = 837,
|
||||
SoloShuffleMinItemLevel = 838,
|
||||
PvpPlayerAbandoned = 839,
|
||||
QuestForceRemovedS = 840,
|
||||
AttackNoActions = 841,
|
||||
InRandomBg = 842,
|
||||
InNonRandomBg = 843,
|
||||
BnFriendSelf = 844,
|
||||
BnFriendAlready = 845,
|
||||
BnFriendBlocked = 846,
|
||||
BnFriendListFull = 847,
|
||||
BnFriendRequestSent = 848,
|
||||
BnBroadcastThrottle = 849,
|
||||
BgDeveloperOnly = 850,
|
||||
CurrencySpellSlotMismatch = 851,
|
||||
CurrencyNotTradable = 852,
|
||||
RequiresExpansionS = 853,
|
||||
QuestFailedSpell = 854,
|
||||
TalentFailedUnspentTalentPoints = 855,
|
||||
TalentFailedNotEnoughTalentsInPrimaryTree = 856,
|
||||
TalentFailedNoPrimaryTreeSelected = 857,
|
||||
TalentFailedCantRemoveTalent = 858,
|
||||
TalentFailedUnknown = 859,
|
||||
TalentFailedInCombat = 860,
|
||||
TalentFailedInPvpMatch = 861,
|
||||
TalentFailedInMythicPlus = 862,
|
||||
WargameRequestFailure = 863,
|
||||
RankRequiresAuthenticator = 864,
|
||||
GuildBankVoucherFailed = 865,
|
||||
WargameRequestSent = 866,
|
||||
RequiresAchievementI = 867,
|
||||
RefundResultExceedMaxCurrency = 868,
|
||||
CantBuyQuantity = 869,
|
||||
ItemIsBattlePayLocked = 870,
|
||||
PartyAlreadyInBattlegroundQueue = 871,
|
||||
PartyConfirmingBattlegroundQueue = 872,
|
||||
BattlefieldTeamPartySize = 873,
|
||||
InsuffTrackedCurrencyIs = 874,
|
||||
NotOnTournamentRealm = 875,
|
||||
GuildTrialAccountTrial = 876,
|
||||
GuildTrialAccountVeteran = 877,
|
||||
GuildUndeletableDueToLevel = 878,
|
||||
CantDoThatInAGroup = 879,
|
||||
GuildLeaderReplaced = 880,
|
||||
TransmogrifyCantEquip = 881,
|
||||
TransmogrifyInvalidItemType = 882,
|
||||
TransmogrifyNotSoulbound = 883,
|
||||
TransmogrifyInvalidSource = 884,
|
||||
TransmogrifyInvalidDestination = 885,
|
||||
TransmogrifyMismatch = 886,
|
||||
TransmogrifyLegendary = 887,
|
||||
TransmogrifySameItem = 888,
|
||||
TransmogrifySameAppearance = 889,
|
||||
TransmogrifyNotEquipped = 890,
|
||||
VoidDepositFull = 891,
|
||||
VoidWithdrawFull = 892,
|
||||
VoidStorageWrapped = 893,
|
||||
VoidStorageStackable = 894,
|
||||
VoidStorageUnbound = 895,
|
||||
VoidStorageRepair = 896,
|
||||
VoidStorageCharges = 897,
|
||||
VoidStorageQuest = 898,
|
||||
VoidStorageConjured = 899,
|
||||
VoidStorageMail = 900,
|
||||
VoidStorageBag = 901,
|
||||
VoidTransferStorageFull = 902,
|
||||
VoidTransferInvFull = 903,
|
||||
VoidTransferInternalError = 904,
|
||||
VoidTransferItemInvalid = 905,
|
||||
DifficultyDisabledInLfg = 906,
|
||||
VoidStorageUnique = 907,
|
||||
VoidStorageLoot = 908,
|
||||
VoidStorageHoliday = 909,
|
||||
VoidStorageDuration = 910,
|
||||
VoidStorageLoadFailed = 911,
|
||||
VoidStorageInvalidItem = 912,
|
||||
ParentalControlsChatMuted = 913,
|
||||
SorStartExperienceIncomplete = 914,
|
||||
SorInvalidEmail = 915,
|
||||
SorInvalidComment = 916,
|
||||
ChallengeModeResetCooldownS = 917,
|
||||
ChallengeModeResetKeystone = 918,
|
||||
PetJournalAlreadyInLoadout = 919,
|
||||
ReportSubmittedSuccessfully = 920,
|
||||
ReportSubmissionFailed = 921,
|
||||
SuggestionSubmittedSuccessfully = 922,
|
||||
BugSubmittedSuccessfully = 923,
|
||||
ChallengeModeEnabled = 924,
|
||||
ChallengeModeDisabled = 925,
|
||||
PetbattleCreateFailed = 926,
|
||||
PetbattleNotHere = 927,
|
||||
PetbattleNotHereOnTransport = 928,
|
||||
PetbattleNotHereUnevenGround = 929,
|
||||
PetbattleNotHereObstructed = 930,
|
||||
PetbattleNotWhileInCombat = 931,
|
||||
PetbattleNotWhileDead = 932,
|
||||
PetbattleNotWhileFlying = 933,
|
||||
PetbattleTargetInvalid = 934,
|
||||
PetbattleTargetOutOfRange = 935,
|
||||
PetbattleTargetNotCapturable = 936,
|
||||
PetbattleNotATrainer = 937,
|
||||
PetbattleDeclined = 938,
|
||||
PetbattleInBattle = 939,
|
||||
PetbattleInvalidLoadout = 940,
|
||||
PetbattleAllPetsDead = 941,
|
||||
PetbattleNoPetsInSlots = 942,
|
||||
PetbattleNoAccountLock = 943,
|
||||
PetbattleWildPetTapped = 944,
|
||||
PetbattleRestrictedAccount = 945,
|
||||
PetbattleOpponentNotAvailable = 946,
|
||||
PetbattleNotWhileInMatchedBattle = 947,
|
||||
CantHaveMorePetsOfThatType = 948,
|
||||
CantHaveMorePets = 949,
|
||||
PvpMapNotFound = 950,
|
||||
PvpMapNotSet = 951,
|
||||
PetbattleQueueQueued = 952,
|
||||
PetbattleQueueAlreadyQueued = 953,
|
||||
PetbattleQueueJoinFailed = 954,
|
||||
PetbattleQueueJournalLock = 955,
|
||||
PetbattleQueueRemoved = 956,
|
||||
PetbattleQueueProposalDeclined = 957,
|
||||
PetbattleQueueProposalTimeout = 958,
|
||||
PetbattleQueueOpponentDeclined = 959,
|
||||
PetbattleQueueRequeuedInternal = 960,
|
||||
PetbattleQueueRequeuedRemoved = 961,
|
||||
PetbattleQueueSlotLocked = 962,
|
||||
PetbattleQueueSlotEmpty = 963,
|
||||
PetbattleQueueSlotNoTracker = 964,
|
||||
PetbattleQueueSlotNoSpecies = 965,
|
||||
PetbattleQueueSlotCantBattle = 966,
|
||||
PetbattleQueueSlotRevoked = 967,
|
||||
PetbattleQueueSlotDead = 968,
|
||||
PetbattleQueueSlotNoPet = 969,
|
||||
PetbattleQueueNotWhileNeutral = 970,
|
||||
PetbattleGameTimeLimitWarning = 971,
|
||||
PetbattleGameRoundsLimitWarning = 972,
|
||||
HasRestriction = 973,
|
||||
ItemUpgradeItemTooLowLevel = 974,
|
||||
ItemUpgradeNoPath = 975,
|
||||
ItemUpgradeNoMoreUpgrades = 976,
|
||||
BonusRollEmpty = 977,
|
||||
ChallengeModeFull = 978,
|
||||
ChallengeModeInProgress = 979,
|
||||
ChallengeModeIncorrectKeystone = 980,
|
||||
BattletagFriendNotFound = 981,
|
||||
BattletagFriendNotValid = 982,
|
||||
BattletagFriendNotAllowed = 983,
|
||||
BattletagFriendThrottled = 984,
|
||||
BattletagFriendSuccess = 985,
|
||||
PetTooHighLevelToUncage = 986,
|
||||
PetbattleInternal = 987,
|
||||
CantCagePetYet = 988,
|
||||
NoLootInChallengeMode = 989,
|
||||
QuestPetBattleVictoriesPvpIi = 990,
|
||||
RoleCheckAlreadyInProgress = 991,
|
||||
RecruitAFriendAccountLimit = 992,
|
||||
RecruitAFriendFailed = 993,
|
||||
SetLootPersonal = 994,
|
||||
SetLootMethodFailedCombat = 995,
|
||||
ReagentBankFull = 996,
|
||||
ReagentBankLocked = 997,
|
||||
GarrisonBuildingExists = 998,
|
||||
GarrisonInvalidPlot = 999,
|
||||
GarrisonInvalidBuildingid = 1000,
|
||||
GarrisonInvalidPlotBuilding = 1001,
|
||||
GarrisonRequiresBlueprint = 1002,
|
||||
GarrisonNotEnoughCurrency = 1003,
|
||||
GarrisonNotEnoughGold = 1004,
|
||||
GarrisonCompleteMissionWrongFollowerType = 1005,
|
||||
AlreadyUsingLfgList = 1006,
|
||||
RestrictedAccountLfgListTrial = 1007,
|
||||
ToyUseLimitReached = 1008,
|
||||
ToyAlreadyKnown = 1009,
|
||||
TransmogSetAlreadyKnown = 1010,
|
||||
NotEnoughCurrency = 1011,
|
||||
SpecIsDisabled = 1012,
|
||||
FeatureRestrictedTrial = 1013,
|
||||
CantBeObliterated = 1014,
|
||||
CantBeScrapped = 1015,
|
||||
CantBeRecrafted = 1016,
|
||||
ArtifactRelicDoesNotMatchArtifact = 1017,
|
||||
MustEquipArtifact = 1018,
|
||||
CantDoThatRightNow = 1019,
|
||||
AffectingCombat = 1020,
|
||||
EquipmentManagerCombatSwapS = 1021,
|
||||
EquipmentManagerBagsFull = 1022,
|
||||
EquipmentManagerMissingItemS = 1023,
|
||||
MovieRecordingWarningPerf = 1024,
|
||||
MovieRecordingWarningDiskFull = 1025,
|
||||
MovieRecordingWarningNoMovie = 1026,
|
||||
MovieRecordingWarningRequirements = 1027,
|
||||
MovieRecordingWarningCompressing = 1028,
|
||||
NoChallengeModeReward = 1029,
|
||||
ClaimedChallengeModeReward = 1030,
|
||||
ChallengeModePeriodResetSs = 1031,
|
||||
CantDoThatChallengeModeActive = 1032,
|
||||
TalentFailedRestArea = 1033,
|
||||
CannotAbandonLastPet = 1034,
|
||||
TestCvarSetSss = 1035,
|
||||
QuestTurnInFailReason = 1036,
|
||||
ClaimedChallengeModeRewardOld = 1037,
|
||||
TalentGrantedByAura = 1038,
|
||||
ChallengeModeAlreadyComplete = 1039,
|
||||
GlyphTargetNotAvailable = 1040,
|
||||
PvpWarmodeToggleOn = 1041,
|
||||
PvpWarmodeToggleOff = 1042,
|
||||
SpellFailedLevelRequirement = 1043,
|
||||
SpellFailedCantFlyHere = 1044,
|
||||
BattlegroundJoinRequiresLevel = 1045,
|
||||
BattlegroundJoinDisqualified = 1046,
|
||||
BattlegroundJoinDisqualifiedNoName = 1047,
|
||||
VoiceChatGenericUnableToConnect = 1048,
|
||||
VoiceChatServiceLost = 1049,
|
||||
VoiceChatChannelNameTooShort = 1050,
|
||||
VoiceChatChannelNameTooLong = 1051,
|
||||
VoiceChatChannelAlreadyExists = 1052,
|
||||
VoiceChatTargetNotFound = 1053,
|
||||
VoiceChatTooManyRequests = 1054,
|
||||
VoiceChatPlayerSilenced = 1055,
|
||||
VoiceChatParentalDisableAll = 1056,
|
||||
VoiceChatDisabled = 1057,
|
||||
NoPvpReward = 1058,
|
||||
ClaimedPvpReward = 1059,
|
||||
AzeriteEssenceSelectionFailedEssenceNotUnlocked = 1060,
|
||||
AzeriteEssenceSelectionFailedCantRemoveEssence = 1061,
|
||||
AzeriteEssenceSelectionFailedConditionFailed = 1062,
|
||||
AzeriteEssenceSelectionFailedRestArea = 1063,
|
||||
AzeriteEssenceSelectionFailedSlotLocked = 1064,
|
||||
AzeriteEssenceSelectionFailedNotAtForge = 1065,
|
||||
AzeriteEssenceSelectionFailedHeartLevelTooLow = 1066,
|
||||
AzeriteEssenceSelectionFailedNotEquipped = 1067,
|
||||
SocketingRequiresPunchcardredGem = 1068,
|
||||
SocketingPunchcardredGemOnlyInPunchcardredslot = 1069,
|
||||
SocketingRequiresPunchcardyellowGem = 1070,
|
||||
SocketingPunchcardyellowGemOnlyInPunchcardyellowslot = 1071,
|
||||
SocketingRequiresPunchcardblueGem = 1072,
|
||||
SocketingPunchcardblueGemOnlyInPunchcardblueslot = 1073,
|
||||
SocketingRequiresDominationShard = 1074,
|
||||
SocketingDominationShardOnlyInDominationslot = 1075,
|
||||
SocketingRequiresCypherGem = 1076,
|
||||
SocketingCypherGemOnlyInCypherslot = 1077,
|
||||
SocketingRequiresTinkerGem = 1078,
|
||||
SocketingTinkerGemOnlyInTinkerslot = 1079,
|
||||
SocketingRequiresPrimordialGem = 1080,
|
||||
SocketingPrimordialGemOnlyInPrimordialslot = 1081,
|
||||
LevelLinkingResultLinked = 1082,
|
||||
LevelLinkingResultUnlinked = 1083,
|
||||
ClubFinderErrorPostClub = 1084,
|
||||
ClubFinderErrorApplyClub = 1085,
|
||||
ClubFinderErrorRespondApplicant = 1086,
|
||||
ClubFinderErrorCancelApplication = 1087,
|
||||
ClubFinderErrorTypeAcceptApplication = 1088,
|
||||
ClubFinderErrorTypeNoInvitePermissions = 1089,
|
||||
ClubFinderErrorTypeNoPostingPermissions = 1090,
|
||||
ClubFinderErrorTypeApplicantList = 1091,
|
||||
ClubFinderErrorTypeApplicantListNoPerm = 1092,
|
||||
ClubFinderErrorTypeFinderNotAvailable = 1093,
|
||||
ClubFinderErrorTypeGetPostingIds = 1094,
|
||||
ClubFinderErrorTypeJoinApplication = 1095,
|
||||
ClubFinderErrorTypeRealmNotEligible = 1096,
|
||||
ClubFinderErrorTypeFlaggedRename = 1097,
|
||||
ClubFinderErrorTypeFlaggedDescriptionChange = 1098,
|
||||
ItemInteractionNotEnoughGold = 1099,
|
||||
ItemInteractionNotEnoughCurrency = 1100,
|
||||
PlayerChoiceErrorPendingChoice = 1101,
|
||||
SoulbindInvalidConduit = 1102,
|
||||
SoulbindInvalidConduitItem = 1103,
|
||||
SoulbindInvalidTalent = 1104,
|
||||
SoulbindDuplicateConduit = 1105,
|
||||
ActivateSoulbindS = 1106,
|
||||
ActivateSoulbindFailedRestArea = 1107,
|
||||
CantUseProfanity = 1108,
|
||||
NotInPetBattle = 1109,
|
||||
NotInNpe = 1110,
|
||||
NoSpec = 1111,
|
||||
NoDominationshardOverwrite = 1112,
|
||||
UseWeeklyRewardsDisabled = 1113,
|
||||
CrossFactionGroupJoined = 1114,
|
||||
CantTargetUnfriendlyInOverworld = 1115,
|
||||
EquipablespellsSlotsFull = 1116,
|
||||
ItemModAppearanceGroupAlreadyKnown = 1117,
|
||||
WowLabsPartyErrorTypePartyIsFull = 1118,
|
||||
WowLabsPartyErrorTypeMaxInviteSent = 1119,
|
||||
WowLabsPartyErrorTypePlayerAlreadyInvited = 1120,
|
||||
WowLabsPartyErrorTypePartyInviteInvalid = 1121,
|
||||
WowLabsLobbyMatchmakerErrorEnterQueueFailed = 1122,
|
||||
WowLabsLobbyMatchmakerErrorLeaveQueueFailed = 1123,
|
||||
BattlegroundInvitationDeclinedBy = 767,
|
||||
BattlegroundJoinTimedOut = 768,
|
||||
BattlegroundDupeQueue = 769,
|
||||
BattlegroundJoinMustCompleteQuest = 770,
|
||||
InBattlegroundRespec = 771,
|
||||
MailLimitedDurationItem = 772,
|
||||
YellRestrictedTrial = 773,
|
||||
ChatRaidRestrictedTrial = 774,
|
||||
LfgRoleCheckFailed = 775,
|
||||
LfgRoleCheckFailedTimeout = 776,
|
||||
LfgRoleCheckFailedNotViable = 777,
|
||||
LfgReadyCheckFailed = 778,
|
||||
LfgReadyCheckFailedTimeout = 779,
|
||||
LfgGroupFull = 780,
|
||||
LfgNoLfgObject = 781,
|
||||
LfgNoSlotsPlayer = 782,
|
||||
LfgNoSlotsParty = 783,
|
||||
LfgNoSpec = 784,
|
||||
LfgMismatchedSlots = 785,
|
||||
LfgMismatchedSlotsLocalXrealm = 786,
|
||||
LfgPartyPlayersFromDifferentRealms = 787,
|
||||
LfgMembersNotPresent = 788,
|
||||
LfgGetInfoTimeout = 789,
|
||||
LfgInvalidSlot = 790,
|
||||
LfgDeserterPlayer = 791,
|
||||
LfgDeserterParty = 792,
|
||||
LfgDead = 793,
|
||||
LfgRandomCooldownPlayer = 794,
|
||||
LfgRandomCooldownParty = 795,
|
||||
LfgTooManyMembers = 796,
|
||||
LfgTooFewMembers = 797,
|
||||
LfgProposalFailed = 798,
|
||||
LfgProposalDeclinedSelf = 799,
|
||||
LfgProposalDeclinedParty = 800,
|
||||
LfgNoSlotsSelected = 801,
|
||||
LfgNoRolesSelected = 802,
|
||||
LfgRoleCheckInitiated = 803,
|
||||
LfgReadyCheckInitiated = 804,
|
||||
LfgPlayerDeclinedRoleCheck = 805,
|
||||
LfgPlayerDeclinedReadyCheck = 806,
|
||||
LfgJoinedQueue = 807,
|
||||
LfgJoinedFlexQueue = 808,
|
||||
LfgJoinedRfQueue = 809,
|
||||
LfgJoinedScenarioQueue = 810,
|
||||
LfgJoinedWorldPvpQueue = 811,
|
||||
LfgJoinedBattlefieldQueue = 812,
|
||||
LfgJoinedList = 813,
|
||||
LfgLeftQueue = 814,
|
||||
LfgLeftList = 815,
|
||||
LfgRoleCheckAborted = 816,
|
||||
LfgReadyCheckAborted = 817,
|
||||
LfgCantUseBattleground = 818,
|
||||
LfgCantUseDungeons = 819,
|
||||
LfgReasonTooManyLfg = 820,
|
||||
LfgFarmLimit = 821,
|
||||
LfgNoCrossFactionParties = 822,
|
||||
InvalidTeleportLocation = 823,
|
||||
TooFarToInteract = 824,
|
||||
BattlegroundPlayersFromDifferentRealms = 825,
|
||||
DifficultyChangeCooldownS = 826,
|
||||
DifficultyChangeCombatCooldownS = 827,
|
||||
DifficultyChangeWorldstate = 828,
|
||||
DifficultyChangeEncounter = 829,
|
||||
DifficultyChangeCombat = 830,
|
||||
DifficultyChangePlayerBusy = 831,
|
||||
DifficultyChangePlayerOnVehicle = 832,
|
||||
DifficultyChangeAlreadyStarted = 833,
|
||||
DifficultyChangeOtherHeroicS = 834,
|
||||
DifficultyChangeHeroicInstanceAlreadyRunning = 835,
|
||||
ArenaTeamPartySize = 836,
|
||||
SoloShuffleWargameGroupSize = 837,
|
||||
SoloShuffleWargameGroupComp = 838,
|
||||
SoloShuffleMinItemLevel = 839,
|
||||
PvpPlayerAbandoned = 840,
|
||||
QuestForceRemovedS = 841,
|
||||
AttackNoActions = 842,
|
||||
InRandomBg = 843,
|
||||
InNonRandomBg = 844,
|
||||
BnFriendSelf = 845,
|
||||
BnFriendAlready = 846,
|
||||
BnFriendBlocked = 847,
|
||||
BnFriendListFull = 848,
|
||||
BnFriendRequestSent = 849,
|
||||
BnBroadcastThrottle = 850,
|
||||
BgDeveloperOnly = 851,
|
||||
CurrencySpellSlotMismatch = 852,
|
||||
CurrencyNotTradable = 853,
|
||||
RequiresExpansionS = 854,
|
||||
QuestFailedSpell = 855,
|
||||
TalentFailedUnspentTalentPoints = 856,
|
||||
TalentFailedNotEnoughTalentsInPrimaryTree = 857,
|
||||
TalentFailedNoPrimaryTreeSelected = 858,
|
||||
TalentFailedCantRemoveTalent = 859,
|
||||
TalentFailedUnknown = 860,
|
||||
TalentFailedInCombat = 861,
|
||||
TalentFailedInPvpMatch = 862,
|
||||
TalentFailedInMythicPlus = 863,
|
||||
WargameRequestFailure = 864,
|
||||
RankRequiresAuthenticator = 865,
|
||||
GuildBankVoucherFailed = 866,
|
||||
WargameRequestSent = 867,
|
||||
RequiresAchievementI = 868,
|
||||
RefundResultExceedMaxCurrency = 869,
|
||||
CantBuyQuantity = 870,
|
||||
ItemIsBattlePayLocked = 871,
|
||||
PartyAlreadyInBattlegroundQueue = 872,
|
||||
PartyConfirmingBattlegroundQueue = 873,
|
||||
BattlefieldTeamPartySize = 874,
|
||||
InsuffTrackedCurrencyIs = 875,
|
||||
NotOnTournamentRealm = 876,
|
||||
GuildTrialAccountTrial = 877,
|
||||
GuildTrialAccountVeteran = 878,
|
||||
GuildUndeletableDueToLevel = 879,
|
||||
CantDoThatInAGroup = 880,
|
||||
GuildLeaderReplaced = 881,
|
||||
TransmogrifyCantEquip = 882,
|
||||
TransmogrifyInvalidItemType = 883,
|
||||
TransmogrifyNotSoulbound = 884,
|
||||
TransmogrifyInvalidSource = 885,
|
||||
TransmogrifyInvalidDestination = 886,
|
||||
TransmogrifyMismatch = 887,
|
||||
TransmogrifyLegendary = 888,
|
||||
TransmogrifySameItem = 889,
|
||||
TransmogrifySameAppearance = 890,
|
||||
TransmogrifyNotEquipped = 891,
|
||||
VoidDepositFull = 892,
|
||||
VoidWithdrawFull = 893,
|
||||
VoidStorageWrapped = 894,
|
||||
VoidStorageStackable = 895,
|
||||
VoidStorageUnbound = 896,
|
||||
VoidStorageRepair = 897,
|
||||
VoidStorageCharges = 898,
|
||||
VoidStorageQuest = 899,
|
||||
VoidStorageConjured = 900,
|
||||
VoidStorageMail = 901,
|
||||
VoidStorageBag = 902,
|
||||
VoidTransferStorageFull = 903,
|
||||
VoidTransferInvFull = 904,
|
||||
VoidTransferInternalError = 905,
|
||||
VoidTransferItemInvalid = 906,
|
||||
DifficultyDisabledInLfg = 907,
|
||||
VoidStorageUnique = 908,
|
||||
VoidStorageLoot = 909,
|
||||
VoidStorageHoliday = 910,
|
||||
VoidStorageDuration = 911,
|
||||
VoidStorageLoadFailed = 912,
|
||||
VoidStorageInvalidItem = 913,
|
||||
ParentalControlsChatMuted = 914,
|
||||
SorStartExperienceIncomplete = 915,
|
||||
SorInvalidEmail = 916,
|
||||
SorInvalidComment = 917,
|
||||
ChallengeModeResetCooldownS = 918,
|
||||
ChallengeModeResetKeystone = 919,
|
||||
PetJournalAlreadyInLoadout = 920,
|
||||
ReportSubmittedSuccessfully = 921,
|
||||
ReportSubmissionFailed = 922,
|
||||
SuggestionSubmittedSuccessfully = 923,
|
||||
BugSubmittedSuccessfully = 924,
|
||||
ChallengeModeEnabled = 925,
|
||||
ChallengeModeDisabled = 926,
|
||||
PetbattleCreateFailed = 927,
|
||||
PetbattleNotHere = 928,
|
||||
PetbattleNotHereOnTransport = 929,
|
||||
PetbattleNotHereUnevenGround = 930,
|
||||
PetbattleNotHereObstructed = 931,
|
||||
PetbattleNotWhileInCombat = 932,
|
||||
PetbattleNotWhileDead = 933,
|
||||
PetbattleNotWhileFlying = 934,
|
||||
PetbattleTargetInvalid = 935,
|
||||
PetbattleTargetOutOfRange = 936,
|
||||
PetbattleTargetNotCapturable = 937,
|
||||
PetbattleNotATrainer = 938,
|
||||
PetbattleDeclined = 939,
|
||||
PetbattleInBattle = 940,
|
||||
PetbattleInvalidLoadout = 941,
|
||||
PetbattleAllPetsDead = 942,
|
||||
PetbattleNoPetsInSlots = 943,
|
||||
PetbattleNoAccountLock = 944,
|
||||
PetbattleWildPetTapped = 945,
|
||||
PetbattleRestrictedAccount = 946,
|
||||
PetbattleOpponentNotAvailable = 947,
|
||||
PetbattleNotWhileInMatchedBattle = 948,
|
||||
CantHaveMorePetsOfThatType = 949,
|
||||
CantHaveMorePets = 950,
|
||||
PvpMapNotFound = 951,
|
||||
PvpMapNotSet = 952,
|
||||
PetbattleQueueQueued = 953,
|
||||
PetbattleQueueAlreadyQueued = 954,
|
||||
PetbattleQueueJoinFailed = 955,
|
||||
PetbattleQueueJournalLock = 956,
|
||||
PetbattleQueueRemoved = 957,
|
||||
PetbattleQueueProposalDeclined = 958,
|
||||
PetbattleQueueProposalTimeout = 959,
|
||||
PetbattleQueueOpponentDeclined = 960,
|
||||
PetbattleQueueRequeuedInternal = 961,
|
||||
PetbattleQueueRequeuedRemoved = 962,
|
||||
PetbattleQueueSlotLocked = 963,
|
||||
PetbattleQueueSlotEmpty = 964,
|
||||
PetbattleQueueSlotNoTracker = 965,
|
||||
PetbattleQueueSlotNoSpecies = 966,
|
||||
PetbattleQueueSlotCantBattle = 967,
|
||||
PetbattleQueueSlotRevoked = 968,
|
||||
PetbattleQueueSlotDead = 969,
|
||||
PetbattleQueueSlotNoPet = 970,
|
||||
PetbattleQueueNotWhileNeutral = 971,
|
||||
PetbattleGameTimeLimitWarning = 972,
|
||||
PetbattleGameRoundsLimitWarning = 973,
|
||||
HasRestriction = 974,
|
||||
ItemUpgradeItemTooLowLevel = 975,
|
||||
ItemUpgradeNoPath = 976,
|
||||
ItemUpgradeNoMoreUpgrades = 977,
|
||||
BonusRollEmpty = 978,
|
||||
ChallengeModeFull = 979,
|
||||
ChallengeModeInProgress = 980,
|
||||
ChallengeModeIncorrectKeystone = 981,
|
||||
BattletagFriendNotFound = 982,
|
||||
BattletagFriendNotValid = 983,
|
||||
BattletagFriendNotAllowed = 984,
|
||||
BattletagFriendThrottled = 985,
|
||||
BattletagFriendSuccess = 986,
|
||||
PetTooHighLevelToUncage = 987,
|
||||
PetbattleInternal = 988,
|
||||
CantCagePetYet = 989,
|
||||
NoLootInChallengeMode = 990,
|
||||
QuestPetBattleVictoriesPvpIi = 991,
|
||||
RoleCheckAlreadyInProgress = 992,
|
||||
RecruitAFriendAccountLimit = 993,
|
||||
RecruitAFriendFailed = 994,
|
||||
SetLootPersonal = 995,
|
||||
SetLootMethodFailedCombat = 996,
|
||||
ReagentBankFull = 997,
|
||||
ReagentBankLocked = 998,
|
||||
GarrisonBuildingExists = 999,
|
||||
GarrisonInvalidPlot = 1000,
|
||||
GarrisonInvalidBuildingid = 1001,
|
||||
GarrisonInvalidPlotBuilding = 1002,
|
||||
GarrisonRequiresBlueprint = 1003,
|
||||
GarrisonNotEnoughCurrency = 1004,
|
||||
GarrisonNotEnoughGold = 1005,
|
||||
GarrisonCompleteMissionWrongFollowerType = 1006,
|
||||
AlreadyUsingLfgList = 1007,
|
||||
RestrictedAccountLfgListTrial = 1008,
|
||||
ToyUseLimitReached = 1009,
|
||||
ToyAlreadyKnown = 1010,
|
||||
TransmogSetAlreadyKnown = 1011,
|
||||
NotEnoughCurrency = 1012,
|
||||
SpecIsDisabled = 1013,
|
||||
FeatureRestrictedTrial = 1014,
|
||||
CantBeObliterated = 1015,
|
||||
CantBeScrapped = 1016,
|
||||
CantBeRecrafted = 1017,
|
||||
ArtifactRelicDoesNotMatchArtifact = 1018,
|
||||
MustEquipArtifact = 1019,
|
||||
CantDoThatRightNow = 1020,
|
||||
AffectingCombat = 1021,
|
||||
EquipmentManagerCombatSwapS = 1022,
|
||||
EquipmentManagerBagsFull = 1023,
|
||||
EquipmentManagerMissingItemS = 1024,
|
||||
MovieRecordingWarningPerf = 1025,
|
||||
MovieRecordingWarningDiskFull = 1026,
|
||||
MovieRecordingWarningNoMovie = 1027,
|
||||
MovieRecordingWarningRequirements = 1028,
|
||||
MovieRecordingWarningCompressing = 1029,
|
||||
NoChallengeModeReward = 1030,
|
||||
ClaimedChallengeModeReward = 1031,
|
||||
ChallengeModePeriodResetSs = 1032,
|
||||
CantDoThatChallengeModeActive = 1033,
|
||||
TalentFailedRestArea = 1034,
|
||||
CannotAbandonLastPet = 1035,
|
||||
TestCvarSetSss = 1036,
|
||||
QuestTurnInFailReason = 1037,
|
||||
ClaimedChallengeModeRewardOld = 1038,
|
||||
TalentGrantedByAura = 1039,
|
||||
ChallengeModeAlreadyComplete = 1040,
|
||||
GlyphTargetNotAvailable = 1041,
|
||||
PvpWarmodeToggleOn = 1042,
|
||||
PvpWarmodeToggleOff = 1043,
|
||||
SpellFailedLevelRequirement = 1044,
|
||||
SpellFailedCantFlyHere = 1045,
|
||||
BattlegroundJoinRequiresLevel = 1046,
|
||||
BattlegroundJoinDisqualified = 1047,
|
||||
BattlegroundJoinDisqualifiedNoName = 1048,
|
||||
VoiceChatGenericUnableToConnect = 1049,
|
||||
VoiceChatServiceLost = 1050,
|
||||
VoiceChatChannelNameTooShort = 1051,
|
||||
VoiceChatChannelNameTooLong = 1052,
|
||||
VoiceChatChannelAlreadyExists = 1053,
|
||||
VoiceChatTargetNotFound = 1054,
|
||||
VoiceChatTooManyRequests = 1055,
|
||||
VoiceChatPlayerSilenced = 1056,
|
||||
VoiceChatParentalDisableAll = 1057,
|
||||
VoiceChatDisabled = 1058,
|
||||
NoPvpReward = 1059,
|
||||
ClaimedPvpReward = 1060,
|
||||
AzeriteEssenceSelectionFailedEssenceNotUnlocked = 1061,
|
||||
AzeriteEssenceSelectionFailedCantRemoveEssence = 1062,
|
||||
AzeriteEssenceSelectionFailedConditionFailed = 1063,
|
||||
AzeriteEssenceSelectionFailedRestArea = 1064,
|
||||
AzeriteEssenceSelectionFailedSlotLocked = 1065,
|
||||
AzeriteEssenceSelectionFailedNotAtForge = 1066,
|
||||
AzeriteEssenceSelectionFailedHeartLevelTooLow = 1067,
|
||||
AzeriteEssenceSelectionFailedNotEquipped = 1068,
|
||||
SocketingRequiresPunchcardredGem = 1069,
|
||||
SocketingPunchcardredGemOnlyInPunchcardredslot = 1070,
|
||||
SocketingRequiresPunchcardyellowGem = 1071,
|
||||
SocketingPunchcardyellowGemOnlyInPunchcardyellowslot = 1072,
|
||||
SocketingRequiresPunchcardblueGem = 1073,
|
||||
SocketingPunchcardblueGemOnlyInPunchcardblueslot = 1074,
|
||||
SocketingRequiresDominationShard = 1075,
|
||||
SocketingDominationShardOnlyInDominationslot = 1076,
|
||||
SocketingRequiresCypherGem = 1077,
|
||||
SocketingCypherGemOnlyInCypherslot = 1078,
|
||||
SocketingRequiresTinkerGem = 1079,
|
||||
SocketingTinkerGemOnlyInTinkerslot = 1080,
|
||||
SocketingRequiresPrimordialGem = 1081,
|
||||
SocketingPrimordialGemOnlyInPrimordialslot = 1082,
|
||||
LevelLinkingResultLinked = 1083,
|
||||
LevelLinkingResultUnlinked = 1084,
|
||||
ClubFinderErrorPostClub = 1085,
|
||||
ClubFinderErrorApplyClub = 1086,
|
||||
ClubFinderErrorRespondApplicant = 1087,
|
||||
ClubFinderErrorCancelApplication = 1088,
|
||||
ClubFinderErrorTypeAcceptApplication = 1089,
|
||||
ClubFinderErrorTypeNoInvitePermissions = 1090,
|
||||
ClubFinderErrorTypeNoPostingPermissions = 1091,
|
||||
ClubFinderErrorTypeApplicantList = 1092,
|
||||
ClubFinderErrorTypeApplicantListNoPerm = 1093,
|
||||
ClubFinderErrorTypeFinderNotAvailable = 1094,
|
||||
ClubFinderErrorTypeGetPostingIds = 1095,
|
||||
ClubFinderErrorTypeJoinApplication = 1096,
|
||||
ClubFinderErrorTypeRealmNotEligible = 1097,
|
||||
ClubFinderErrorTypeFlaggedRename = 1098,
|
||||
ClubFinderErrorTypeFlaggedDescriptionChange = 1099,
|
||||
ItemInteractionNotEnoughGold = 1100,
|
||||
ItemInteractionNotEnoughCurrency = 1101,
|
||||
PlayerChoiceErrorPendingChoice = 1102,
|
||||
SoulbindInvalidConduit = 1103,
|
||||
SoulbindInvalidConduitItem = 1104,
|
||||
SoulbindInvalidTalent = 1105,
|
||||
SoulbindDuplicateConduit = 1106,
|
||||
ActivateSoulbindS = 1107,
|
||||
ActivateSoulbindFailedRestArea = 1108,
|
||||
CantUseProfanity = 1109,
|
||||
NotInPetBattle = 1110,
|
||||
NotInNpe = 1111,
|
||||
NoSpec = 1112,
|
||||
NoDominationshardOverwrite = 1113,
|
||||
UseWeeklyRewardsDisabled = 1114,
|
||||
CrossFactionGroupJoined = 1115,
|
||||
CantTargetUnfriendlyInOverworld = 1116,
|
||||
EquipablespellsSlotsFull = 1117,
|
||||
ItemModAppearanceGroupAlreadyKnown = 1118,
|
||||
CantBulkSellItemWithRefund = 1119,
|
||||
WowLabsPartyErrorTypePartyIsFull = 1120,
|
||||
WowLabsPartyErrorTypeMaxInviteSent = 1121,
|
||||
WowLabsPartyErrorTypePlayerAlreadyInvited = 1122,
|
||||
WowLabsPartyErrorTypePartyInviteInvalid = 1123,
|
||||
WowLabsLobbyMatchmakerErrorEnterQueueFailed = 1124,
|
||||
WowLabsLobbyMatchmakerErrorLeaveQueueFailed = 1125,
|
||||
}
|
||||
|
||||
public enum SceneFlags
|
||||
|
||||
@@ -549,6 +549,8 @@ namespace Framework.Constants
|
||||
AllowMountInCombat = 539,
|
||||
ModSupportStat = 540, // NYI
|
||||
ModRequiredMountCapabilityFlags = 541,
|
||||
Unk542 = 542,
|
||||
Unk543 = 543,
|
||||
Total
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,10 @@ namespace Framework.Constants
|
||||
TouchingGround = 0x40000, // NYI
|
||||
ChromieTime = 0x80000, // NYI
|
||||
SplineFlightOrFreeFlight = 0x100000, // NYI
|
||||
ProcOrPeriodicAttacking = 0x200000 // NYI
|
||||
ProcOrPeriodicAttacking = 0x200000, // NYI
|
||||
StartOfMythicPlusRun = 0x400000, // Implemented in Unit::AtStartOfEncounter
|
||||
StartOfDungeonEncounter = 0x800000, // Implemented in Unit::AtStartOfEncounter - Similar to StartOfEncounter (but only with bosses, not m+ run or battleground)
|
||||
EndOfDungeonEncounter = 0x1000000, // Implemented in Unit::AtEndOfEncounter - Similar to EndOfEncounter (but only with bosses, not m+ run or battleground)
|
||||
}
|
||||
|
||||
// Enum with EffectRadiusIndex and their actual radius
|
||||
|
||||
@@ -242,11 +242,11 @@ namespace Framework.Database
|
||||
// ChrClasses.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHR_CLASSES, "SELECT Name, Filename, NameMale, NameFemale, PetNameToken, Description, RoleInfoString, DisabledString, " +
|
||||
"HyphenatedNameMale, HyphenatedNameFemale, ID, CreateScreenFileDataID, SelectScreenFileDataID, IconFileDataID, LowResScreenFileDataID, Flags, " +
|
||||
"SpellTextureBlobFileDataID, RolesMask, ArmorTypeMask, CharStartKitUnknown901, MaleCharacterCreationVisualFallback, " +
|
||||
"SpellTextureBlobFileDataID, ArmorTypeMask, CharStartKitUnknown901, MaleCharacterCreationVisualFallback, " +
|
||||
"MaleCharacterCreationIdleVisualFallback, FemaleCharacterCreationVisualFallback, FemaleCharacterCreationIdleVisualFallback, " +
|
||||
"CharacterCreationIdleGroundVisualFallback, CharacterCreationGroundVisualFallback, AlteredFormCharacterCreationIdleVisualFallback, " +
|
||||
"CharacterCreationAnimLoopWaitTimeMsFallback, CinematicSequenceID, DefaultSpec, PrimaryStatPriority, DisplayPower, " +
|
||||
"RangedAttackPowerPerAgility, AttackPowerPerAgility, AttackPowerPerStrength, SpellClassSet, ClassColorR, ClassColorG, ClassColorB" +
|
||||
"RangedAttackPowerPerAgility, AttackPowerPerAgility, AttackPowerPerStrength, SpellClassSet, ClassColorR, ClassColorG, ClassColorB, RolesMask" +
|
||||
" FROM chr_classes WHERE (`VerifiedBuild` > 0) = ?");
|
||||
PrepareStatement(HotfixStatements.SEL_CHR_CLASSES_LOCALE, "SELECT ID, Name_lang, NameMale_lang, NameFemale_lang, Description_lang, RoleInfoString_lang, " +
|
||||
"DisabledString_lang, HyphenatedNameMale_lang, HyphenatedNameFemale_lang FROM chr_classes_locale WHERE (`VerifiedBuild` > 0) = ?" +
|
||||
@@ -270,7 +270,7 @@ namespace Framework.Database
|
||||
// ChrCustomizationElement.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CHR_CUSTOMIZATION_ELEMENT, "SELECT ID, ChrCustomizationChoiceID, RelatedChrCustomizationChoiceID, " +
|
||||
"ChrCustomizationGeosetID, ChrCustomizationSkinnedModelID, ChrCustomizationMaterialID, ChrCustomizationBoneSetID, " +
|
||||
"ChrCustomizationCondModelID, ChrCustomizationDisplayInfoID, ChrCustItemGeoModifyID, ChrCustomizationVoiceID, AnimKitID" +
|
||||
"ChrCustomizationCondModelID, ChrCustomizationDisplayInfoID, ChrCustItemGeoModifyID, ChrCustomizationVoiceID, AnimKitID, ParticleColorID" +
|
||||
" FROM chr_customization_element WHERE (`VerifiedBuild` > 0) = ?");
|
||||
|
||||
// ChrCustomizationOption.db2
|
||||
@@ -376,12 +376,12 @@ namespace Framework.Database
|
||||
PrepareStatement(HotfixStatements.SEL_CREATURE_FAMILY_LOCALE, "SELECT ID, Name_lang FROM creature_family_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?");
|
||||
|
||||
// CreatureModelData.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CREATURE_MODEL_DATA, "SELECT ID, GeoBox1, GeoBox2, GeoBox3, GeoBox4, GeoBox5, GeoBox6, Flags, FileDataID, BloodID, " +
|
||||
"FootprintTextureID, FootprintTextureLength, FootprintTextureWidth, FootprintParticleScale, FoleyMaterialID, FootstepCameraEffectID, " +
|
||||
"DeathThudCameraEffectID, SoundID, SizeClass, CollisionWidth, CollisionHeight, WorldEffectScale, CreatureGeosetDataID, HoverHeight, " +
|
||||
"AttachedEffectScale, ModelScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, MountHeight, OverrideLootEffectScale, " +
|
||||
"OverrideNameScale, OverrideSelectionRadius, TamedPetBaseScale, Unknown820_1, Unknown820_2, Unknown820_31, Unknown820_32" +
|
||||
" FROM creature_model_data WHERE (`VerifiedBuild` > 0) = ?");
|
||||
PrepareStatement(HotfixStatements.SEL_CREATURE_MODEL_DATA, "SELECT ID, GeoBox1, GeoBox2, GeoBox3, GeoBox4, GeoBox5, GeoBox6, Flags, FileDataID, WalkSpeed, " +
|
||||
"RunSpeed, BloodID, FootprintTextureID, FootprintTextureLength, FootprintTextureWidth, FootprintParticleScale, FoleyMaterialID, " +
|
||||
"FootstepCameraEffectID, DeathThudCameraEffectID, SoundID, SizeClass, CollisionWidth, CollisionHeight, WorldEffectScale, " +
|
||||
"CreatureGeosetDataID, HoverHeight, AttachedEffectScale, ModelScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, " +
|
||||
"MountHeight, OverrideLootEffectScale, OverrideNameScale, OverrideSelectionRadius, TamedPetBaseScale, Unknown820_1, Unknown820_2, " +
|
||||
"Unknown820_31, Unknown820_32 FROM creature_model_data WHERE (`VerifiedBuild` > 0) = ?");
|
||||
|
||||
// CreatureType.db2
|
||||
PrepareStatement(HotfixStatements.SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type WHERE (`VerifiedBuild` > 0) = ?");
|
||||
|
||||
@@ -283,7 +283,7 @@ public RealmBuildInfo GetBuildInfo(uint build)
|
||||
addressFamily.Id = 1;
|
||||
|
||||
var address = new Address();
|
||||
address.Ip = realm.GetAddressForClient(clientAddress).Address.ToString();
|
||||
address.Ip = realm.GetAddressForClient(clientAddress).ToString();
|
||||
address.Port = realm.Port;
|
||||
addressFamily.Addresses.Add(address);
|
||||
serverAddresses.Families.Add(addressFamily);
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace Game.BattleGrounds
|
||||
{
|
||||
Player player = Global.ObjAccessor.FindPlayer(guid);
|
||||
if (player != null)
|
||||
player.AtStartOfEncounter();
|
||||
player.AtStartOfEncounter(EncounterType.Battleground);
|
||||
}
|
||||
|
||||
// Remove preparation
|
||||
@@ -805,7 +805,7 @@ namespace Game.BattleGrounds
|
||||
player.RemoveAura(BattlegroundConst.SpellMercenaryShapeshift);
|
||||
player.RemovePlayerFlagEx(PlayerFlagsEx.MercenaryMode);
|
||||
|
||||
player.AtEndOfEncounter();
|
||||
player.AtEndOfEncounter(EncounterType.Battleground);
|
||||
|
||||
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.LeaveArenaOrBattleground);
|
||||
|
||||
|
||||
@@ -270,20 +270,25 @@ namespace Game.DataStorage
|
||||
|
||||
public void LoadAreaTriggerSpawns()
|
||||
{
|
||||
// build single time for check spawnmask
|
||||
MultiMap<uint, Difficulty> spawnMasks = new();
|
||||
foreach (var mapDifficulty in CliDB.MapDifficultyStorage.Values)
|
||||
spawnMasks.Add(mapDifficulty.MapID, (Difficulty)mapDifficulty.DifficultyID);
|
||||
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
// Load area trigger positions (to put them on the server)
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
SQLResult templates = DB.World.Query("SELECT SpawnId, AreaTriggerId, IsServerSide, MapId, PosX, PosY, PosZ, Orientation, PhaseUseFlags, PhaseId, PhaseGroup, " +
|
||||
//11 12 13 14 15 16 17 18 19 20
|
||||
"Shape, ShapeData0, ShapeData1, ShapeData2, ShapeData3, ShapeData4, ShapeData5, ShapeData6, ShapeData7, ScriptName FROM `areatrigger`");
|
||||
if (!templates.IsEmpty())
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11
|
||||
SQLResult result = DB.World.Query("SELECT SpawnId, AreaTriggerId, IsServerSide, MapId, SpawnDifficulties, PosX, PosY, PosZ, Orientation, PhaseUseFlags, PhaseId, PhaseGroup, " +
|
||||
//12 13 14 15 16 17 18 19 20 21 22
|
||||
"Shape, ShapeData0, ShapeData1, ShapeData2, ShapeData3, ShapeData4, ShapeData5, ShapeData6, ShapeData7, SpellForVisuals, ScriptName FROM `areatrigger`");
|
||||
if (!result.IsEmpty())
|
||||
{
|
||||
do
|
||||
{
|
||||
ulong spawnId = templates.Read<ulong>(0);
|
||||
AreaTriggerId areaTriggerId = new(templates.Read<uint>(1), templates.Read<byte>(2) == 1);
|
||||
WorldLocation location = new(templates.Read<uint>(3), templates.Read<float>(4), templates.Read<float>(5), templates.Read<float>(6), templates.Read<float>(7));
|
||||
AreaTriggerTypes shape = (AreaTriggerTypes)templates.Read<byte>(11);
|
||||
ulong spawnId = result.Read<ulong>(0);
|
||||
AreaTriggerId areaTriggerId = new(result.Read<uint>(1), result.Read<byte>(2) == 1);
|
||||
WorldLocation location = new(result.Read<uint>(3), result.Read<float>(5), result.Read<float>(6), result.Read<float>(7), result.Read<float>(8));
|
||||
AreaTriggerTypes shape = (AreaTriggerTypes)result.Read<byte>(12);
|
||||
|
||||
if (GetAreaTriggerTemplate(areaTriggerId) == null)
|
||||
{
|
||||
@@ -303,36 +308,60 @@ namespace Game.DataStorage
|
||||
continue;
|
||||
}
|
||||
|
||||
var difficulties = Global.ObjectMgr.ParseSpawnDifficulties(result.Read<string>(4), "areatrigger", spawnId, location.GetMapId(), spawnMasks[location.GetMapId()]);
|
||||
if (difficulties.Empty())
|
||||
{
|
||||
Log.outDebug(LogFilter.Sql, $"Table `areatrigger` has areatrigger (GUID: {spawnId}) that is not spawned in any difficulty, skipped.");
|
||||
continue;
|
||||
}
|
||||
|
||||
AreaTriggerSpawn spawn = new();
|
||||
spawn.SpawnId = spawnId;
|
||||
spawn.MapId = location.GetMapId();
|
||||
spawn.TriggerId = areaTriggerId;
|
||||
spawn.SpawnPoint = new Position(location);
|
||||
|
||||
spawn.PhaseUseFlags = (PhaseUseFlagsValues)templates.Read<byte>(8);
|
||||
spawn.PhaseId = templates.Read<uint>(9);
|
||||
spawn.PhaseGroup = templates.Read<uint>(10);
|
||||
spawn.PhaseUseFlags = (PhaseUseFlagsValues)result.Read<byte>(9);
|
||||
spawn.PhaseId = result.Read<uint>(10);
|
||||
spawn.PhaseGroup = result.Read<uint>(11);
|
||||
|
||||
spawn.Shape.TriggerType = shape;
|
||||
unsafe
|
||||
{
|
||||
for (var i = 0; i < SharedConst.MaxAreatriggerEntityData; ++i)
|
||||
spawn.Shape.DefaultDatas.Data[i] = templates.Read<float>(12 + i);
|
||||
spawn.Shape.DefaultDatas.Data[i] = result.Read<float>(13 + i);
|
||||
}
|
||||
|
||||
spawn.ScriptId = Global.ObjectMgr.GetScriptId(templates.Read<string>(20));
|
||||
if (!result.IsNull(21))
|
||||
{
|
||||
spawn.SpellForVisuals = result.Read<uint>(21);
|
||||
if (!Global.SpellMgr.HasSpellInfo(spawn.SpellForVisuals.Value, Difficulty.None))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `areatrigger` has listed areatrigger SpawnId: {spawnId} with invalid SpellForVisual {spawn.SpellForVisuals}, set to none.");
|
||||
spawn.SpellForVisuals = null;
|
||||
}
|
||||
}
|
||||
|
||||
spawn.ScriptId = Global.ObjectMgr.GetScriptId(result.Read<string>(22));
|
||||
spawn.spawnGroupData = Global.ObjectMgr.GetLegacySpawnGroup();
|
||||
|
||||
// Add the trigger to a map::cell map, which is later used by GridLoader to query
|
||||
CellCoord cellCoord = GridDefines.ComputeCellCoord(spawn.SpawnPoint.GetPositionX(), spawn.SpawnPoint.GetPositionY());
|
||||
if (!_areaTriggerSpawnsByLocation.ContainsKey((spawn.MapId, cellCoord.GetId())))
|
||||
_areaTriggerSpawnsByLocation[(spawn.MapId, cellCoord.GetId())] = new SortedSet<ulong>();
|
||||
|
||||
_areaTriggerSpawnsByLocation[(spawn.MapId, cellCoord.GetId())].Add(spawnId);
|
||||
foreach (Difficulty difficulty in difficulties)
|
||||
{
|
||||
if (!_areaTriggerSpawnsByLocation.ContainsKey((spawn.MapId, difficulty)))
|
||||
_areaTriggerSpawnsByLocation[(spawn.MapId, difficulty)] = new Dictionary<uint, SortedSet<ulong>>();
|
||||
|
||||
if (!_areaTriggerSpawnsByLocation[(spawn.MapId, difficulty)].ContainsKey(cellCoord.GetId()))
|
||||
_areaTriggerSpawnsByLocation[(spawn.MapId, difficulty)][cellCoord.GetId()] = new SortedSet<ulong>();
|
||||
|
||||
_areaTriggerSpawnsByLocation[(spawn.MapId, difficulty)][cellCoord.GetId()].Add(spawnId);
|
||||
}
|
||||
|
||||
// add the position to the map
|
||||
_areaTriggerSpawnsBySpawnId[spawnId] = spawn;
|
||||
} while (templates.NextRow());
|
||||
} while (result.NextRow());
|
||||
}
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {_areaTriggerSpawnsBySpawnId.Count} areatrigger spawns in {Time.GetMSTimeDiffToNow(oldMSTime)} ms.");
|
||||
@@ -348,9 +377,13 @@ namespace Game.DataStorage
|
||||
return _areaTriggerCreateProperties.LookupByKey(spellMiscValue);
|
||||
}
|
||||
|
||||
public SortedSet<ulong> GetAreaTriggersForMapAndCell(uint mapId, uint cellId)
|
||||
public SortedSet<ulong> GetAreaTriggersForMapAndCell(uint mapId, Difficulty difficulty, uint cellId)
|
||||
{
|
||||
return _areaTriggerSpawnsByLocation.LookupByKey((mapId, cellId));
|
||||
var atForMapAndDifficulty = _areaTriggerSpawnsByLocation.LookupByKey((mapId, difficulty));
|
||||
if (atForMapAndDifficulty != null)
|
||||
return atForMapAndDifficulty.LookupByKey(cellId);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public AreaTriggerSpawn GetAreaTriggerSpawn(ulong spawnId)
|
||||
@@ -358,7 +391,7 @@ namespace Game.DataStorage
|
||||
return _areaTriggerSpawnsBySpawnId.LookupByKey(spawnId);
|
||||
}
|
||||
|
||||
Dictionary<(uint mapId, uint cellId), SortedSet<ulong>> _areaTriggerSpawnsByLocation = new();
|
||||
Dictionary<(uint, Difficulty), Dictionary<uint, SortedSet<ulong>>> _areaTriggerSpawnsByLocation = new();
|
||||
Dictionary<ulong, AreaTriggerSpawn> _areaTriggerSpawnsBySpawnId = new();
|
||||
Dictionary<AreaTriggerId, AreaTriggerTemplate> _areaTriggerTemplateStore = new();
|
||||
Dictionary<uint, AreaTriggerCreateProperties> _areaTriggerCreateProperties = new();
|
||||
|
||||
@@ -34,7 +34,13 @@ namespace Game.DataStorage
|
||||
DB6Storage<T> ReadDB2<T>(string fileName, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale = 0) where T : new()
|
||||
{
|
||||
DB6Storage<T> storage = new();
|
||||
storage.LoadData($"{db2Path}/{defaultLocale}/{fileName}");
|
||||
if (!storage.LoadData($"{db2Path}/{defaultLocale}/{fileName}"))
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, "Error loading DB2 files");
|
||||
Environment.Exit(1);
|
||||
return null;
|
||||
}
|
||||
|
||||
storage.LoadHotfixData(availableDb2Locales, preparedStatement, preparedStatementLocale);
|
||||
|
||||
Global.DB2Mgr.AddDB2(storage.GetTableHash(), storage);
|
||||
|
||||
@@ -32,12 +32,12 @@ namespace Game.DataStorage
|
||||
WDCHeader _header;
|
||||
string _tableName = typeof(T).Name;
|
||||
|
||||
public void LoadData(string fullFileName)
|
||||
public bool LoadData(string fullFileName)
|
||||
{
|
||||
if (!File.Exists(fullFileName))
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"File {fullFileName} not found.");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
DBReader reader = new();
|
||||
@@ -46,7 +46,7 @@ namespace Game.DataStorage
|
||||
if (!reader.Load(stream))
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"Error loading {fullFileName}.");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,8 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (var b in reader.Records)
|
||||
Add((uint)b.Key, b.Value.As<T>());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void LoadHotfixData(BitSet availableDb2Locales, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale)
|
||||
|
||||
@@ -92,7 +92,6 @@ namespace Game.DataStorage
|
||||
public uint LowResScreenFileDataID;
|
||||
public int Flags;
|
||||
public uint SpellTextureBlobFileDataID;
|
||||
public uint RolesMask;
|
||||
public uint ArmorTypeMask;
|
||||
public int CharStartKitUnknown901;
|
||||
public int MaleCharacterCreationVisualFallback;
|
||||
@@ -114,6 +113,7 @@ namespace Game.DataStorage
|
||||
public byte ClassColorR;
|
||||
public byte ClassColorG;
|
||||
public byte ClassColorB;
|
||||
public byte RolesMask;
|
||||
}
|
||||
|
||||
public sealed class ChrClassesXPowerTypesRecord
|
||||
@@ -161,6 +161,7 @@ namespace Game.DataStorage
|
||||
public int ChrCustItemGeoModifyID;
|
||||
public int ChrCustomizationVoiceID;
|
||||
public int AnimKitID;
|
||||
public int ParticleColorID;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationOptionRecord
|
||||
@@ -481,6 +482,8 @@ namespace Game.DataStorage
|
||||
public float[] GeoBox = new float[6];
|
||||
public uint Flags;
|
||||
public uint FileDataID;
|
||||
public float WalkSpeed;
|
||||
public float RunSpeed;
|
||||
public uint BloodID;
|
||||
public uint FootprintTextureID;
|
||||
public float FootprintTextureLength;
|
||||
|
||||
@@ -95,7 +95,13 @@ namespace Game.DataStorage
|
||||
public bool IsDynamicDifficultyMap() { return GetFlags().HasFlag(MapFlags.DynamicDifficulty); }
|
||||
public bool IsFlexLocking() { return GetFlags().HasFlag(MapFlags.FlexibleRaidLocking); }
|
||||
public bool IsGarrison() { return GetFlags().HasFlag(MapFlags.Garrison); }
|
||||
public bool IsSplitByFaction() { return Id == 609 || Id == 2175 || Id == 2570; }
|
||||
public bool IsSplitByFaction()
|
||||
{
|
||||
return Id == 609 || // Acherus (DeathKnight Start)
|
||||
Id == 1265 || // Assault on the Dark Portal (WoD Intro)
|
||||
Id == 2175 || // Exiles Reach - NPE
|
||||
Id == 2570; // Forbidden Reach (Dracthyr/Evoker Start)
|
||||
}
|
||||
|
||||
public MapFlags GetFlags() { return (MapFlags)Flags[0]; }
|
||||
public MapFlags2 GetFlags2() { return (MapFlags2)Flags[1]; }
|
||||
|
||||
@@ -246,13 +246,26 @@ namespace Game.Entities
|
||||
SetEntry(areaTriggerTemplate.Id.Id);
|
||||
|
||||
SetObjectScale(1.0f);
|
||||
SetDuration(-1);
|
||||
|
||||
SetUpdateFieldValue(m_areaTriggerData.ModifyValue(m_areaTriggerData.BoundsRadius2D), GetMaxSearchRadius());
|
||||
SetUpdateFieldValue(m_areaTriggerData.ModifyValue(m_areaTriggerData.DecalPropertiesID), 24u); // blue decal, for .debug areatrigger visibility
|
||||
if (position.SpellForVisuals.HasValue)
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(position.SpellForVisuals.Value, Difficulty.None);
|
||||
SetUpdateFieldValue(m_areaTriggerData.ModifyValue(m_areaTriggerData.SpellForVisuals), position.SpellForVisuals.Value);
|
||||
|
||||
ScaleCurve extraScaleCurve = m_areaTriggerData.ModifyValue(m_areaTriggerData.ExtraScaleCurve);
|
||||
SetUpdateFieldValue(extraScaleCurve.ModifyValue(extraScaleCurve.ParameterCurve), (uint)1.0000001f);
|
||||
SetUpdateFieldValue(extraScaleCurve.ModifyValue(extraScaleCurve.OverrideActive), true);
|
||||
SpellCastVisualField spellCastVisual = m_areaTriggerData.ModifyValue(m_areaTriggerData.SpellVisual);
|
||||
SetUpdateFieldValue(ref spellCastVisual.SpellXSpellVisualID, spellInfo.GetSpellXSpellVisualId());
|
||||
SetUpdateFieldValue(ref spellCastVisual.ScriptVisualID, 0u);
|
||||
}
|
||||
|
||||
if (IsServerSide())
|
||||
SetUpdateFieldValue(m_areaTriggerData.ModifyValue(m_areaTriggerData.DecalPropertiesID), 24u); // blue decal, for .debug areatrigger visibility
|
||||
|
||||
SetScaleCurve(m_areaTriggerData.ModifyValue(m_areaTriggerData.ExtraScaleCurve), new AreaTriggerScaleCurveTemplate());
|
||||
|
||||
VisualAnim visualAnim = m_areaTriggerData.ModifyValue(m_areaTriggerData.VisualAnim);
|
||||
SetUpdateFieldValue(visualAnim.ModifyValue(visualAnim.AnimationDataID), -1);
|
||||
|
||||
_shape = position.Shape;
|
||||
_maxSearchRadius = _shape.GetMaxSearchRadius();
|
||||
@@ -289,16 +302,16 @@ namespace Game.Entities
|
||||
}
|
||||
else
|
||||
UpdateSplinePosition(diff);
|
||||
}
|
||||
|
||||
if (GetDuration() != -1)
|
||||
if (GetDuration() != -1)
|
||||
{
|
||||
if (GetDuration() > diff)
|
||||
_UpdateDuration((int)(_duration - diff));
|
||||
else
|
||||
{
|
||||
if (GetDuration() > diff)
|
||||
_UpdateDuration((int)(_duration - diff));
|
||||
else
|
||||
{
|
||||
Remove(); // expired
|
||||
return;
|
||||
}
|
||||
Remove(); // expired
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +381,7 @@ namespace Game.Entities
|
||||
SetUpdateFieldValue(scaleCurve.ModifyValue(scaleCurve.OverrideActive), true);
|
||||
SetUpdateFieldValue(scaleCurve.ModifyValue(scaleCurve.StartTimeOffset), curve.StartTimeOffset);
|
||||
|
||||
Position point = null;
|
||||
Position point = new Position();
|
||||
// ParameterCurve packing information
|
||||
// (not_using_points & 1) | ((interpolation_mode & 0x7) << 1) | ((first_point_offset & 0xFFFFF) << 4) | ((point_count & 0xFF) << 24)
|
||||
// if not_using_points is set then the entire field is simply read as a float (ignoring that lowest bit)
|
||||
|
||||
@@ -292,6 +292,7 @@ namespace Game.Entities
|
||||
{
|
||||
public AreaTriggerId TriggerId;
|
||||
public AreaTriggerShapeInfo Shape = new();
|
||||
public uint? SpellForVisuals;
|
||||
|
||||
public AreaTriggerSpawn() : base(SpawnObjectType.AreaTrigger) { }
|
||||
}
|
||||
|
||||
@@ -1315,10 +1315,11 @@ namespace Game.Entities
|
||||
CreatureData data = Global.ObjectMgr.NewOrExistCreatureData(m_spawnId);
|
||||
|
||||
uint displayId = GetNativeDisplayId();
|
||||
ulong npcflag = ((ulong)m_unitData.NpcFlags[1] << 32) | m_unitData.NpcFlags[0];
|
||||
uint unitFlags = m_unitData.Flags;
|
||||
uint unitFlags2 = m_unitData.Flags2;
|
||||
uint unitFlags3 = m_unitData.Flags3;
|
||||
ulong spawnNpcFlags = ((ulong)m_unitData.NpcFlags[1] << 32) | m_unitData.NpcFlags[0];
|
||||
ulong? npcflag = null;
|
||||
uint? unitFlags = null;
|
||||
uint? unitFlags2 = null;
|
||||
uint? unitFlags3 = null;
|
||||
|
||||
// check if it's a custom model and if not, use 0 for displayId
|
||||
CreatureTemplate cinfo = GetCreatureTemplate();
|
||||
@@ -1328,17 +1329,17 @@ namespace Game.Entities
|
||||
if (displayId != 0 && displayId == model.CreatureDisplayID)
|
||||
displayId = 0;
|
||||
|
||||
if (npcflag == (uint)cinfo.Npcflag)
|
||||
npcflag = 0;
|
||||
if (spawnNpcFlags != cinfo.Npcflag)
|
||||
npcflag = spawnNpcFlags;
|
||||
|
||||
if (unitFlags == (uint)cinfo.UnitFlags)
|
||||
unitFlags = 0;
|
||||
if (m_unitData.Flags == (uint)cinfo.UnitFlags)
|
||||
unitFlags = m_unitData.Flags;
|
||||
|
||||
if (unitFlags2 == cinfo.UnitFlags2)
|
||||
unitFlags2 = 0;
|
||||
if (m_unitData.Flags2 == cinfo.UnitFlags2)
|
||||
unitFlags2 = m_unitData.Flags2;
|
||||
|
||||
if (unitFlags3 == cinfo.UnitFlags3)
|
||||
unitFlags3 = 0;
|
||||
if (m_unitData.Flags3 == cinfo.UnitFlags3)
|
||||
unitFlags3 = m_unitData.Flags3;
|
||||
}
|
||||
|
||||
if (data.SpawnId == 0)
|
||||
@@ -1408,10 +1409,25 @@ namespace Game.Entities
|
||||
stmt.AddValue(index++, GetHealth());
|
||||
stmt.AddValue(index++, GetPower(PowerType.Mana));
|
||||
stmt.AddValue(index++, (byte)GetDefaultMovementType());
|
||||
stmt.AddValue(index++, npcflag);
|
||||
stmt.AddValue(index++, unitFlags);
|
||||
stmt.AddValue(index++, unitFlags2);
|
||||
stmt.AddValue(index++, unitFlags3);
|
||||
if (npcflag.HasValue)
|
||||
stmt.AddValue(index++, npcflag.Value);
|
||||
else
|
||||
stmt.AddNull(index++);
|
||||
|
||||
if (unitFlags.HasValue)
|
||||
stmt.AddValue(index++, unitFlags.Value);
|
||||
else
|
||||
stmt.AddNull(index++);
|
||||
|
||||
if (unitFlags2.HasValue)
|
||||
stmt.AddValue(index++, unitFlags2.Value);
|
||||
else
|
||||
stmt.AddNull(index++);
|
||||
|
||||
if (unitFlags3.HasValue)
|
||||
stmt.AddValue(index++, unitFlags3.Value);
|
||||
else
|
||||
stmt.AddNull(index++);
|
||||
trans.Append(stmt);
|
||||
|
||||
DB.World.CommitTransaction(trans);
|
||||
|
||||
@@ -266,10 +266,10 @@ namespace Game.Entities
|
||||
public uint curhealth;
|
||||
public uint curmana;
|
||||
public byte movementType;
|
||||
public ulong npcflag;
|
||||
public uint unit_flags; // enum UnitFlags mask values
|
||||
public uint unit_flags2; // enum UnitFlags2 mask values
|
||||
public uint unit_flags3; // enum UnitFlags3 mask values
|
||||
public ulong? npcflag;
|
||||
public uint? unit_flags; // enum UnitFlags mask values
|
||||
public uint? unit_flags2; // enum UnitFlags2 mask values
|
||||
public uint? unit_flags3; // enum UnitFlags3 mask values
|
||||
|
||||
public CreatureData() : base(SpawnObjectType.Creature) { }
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ namespace Game.Entities
|
||||
loot?.Update();
|
||||
|
||||
// Non-consumable chest was partially looted and restock time passed, restock all loot now
|
||||
if (GetGoInfo().Chest.consumable == 0 && GetGoInfo().Chest.chestRestockTime != 0 && GameTime.GetGameTime() >= m_restockTime)
|
||||
if (GetGoInfo().Chest.consumable == 0 && m_restockTime != 0 && GameTime.GetGameTime() >= m_restockTime)
|
||||
{
|
||||
m_restockTime = 0;
|
||||
m_lootState = LootState.Ready;
|
||||
@@ -2361,7 +2361,11 @@ namespace Game.Entities
|
||||
if (info == null)
|
||||
return;
|
||||
|
||||
if (!user.IsPlayer())
|
||||
Player player = user.ToPlayer();
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
if (!player.CanUseBattlegroundObject(this))
|
||||
return;
|
||||
|
||||
GameObjectType.NewFlag newFlag = (GameObjectType.NewFlag)m_goTypeImpl;
|
||||
@@ -2384,12 +2388,15 @@ namespace Game.Entities
|
||||
if (!user.IsPlayer())
|
||||
return;
|
||||
|
||||
if (!user.IsAlive())
|
||||
return;
|
||||
|
||||
GameObject owner = GetMap().GetGameObject(GetOwnerGUID());
|
||||
if (owner != null)
|
||||
{
|
||||
if (owner.GetGoType() == GameObjectTypes.NewFlag)
|
||||
{
|
||||
GameObjectType.NewFlag newFlag = (GameObjectType.NewFlag)m_goTypeImpl;
|
||||
GameObjectType.NewFlag newFlag = (GameObjectType.NewFlag)owner.m_goTypeImpl;
|
||||
if (newFlag == null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -47,187 +47,187 @@ namespace Game.Entities
|
||||
[FieldOffset(64)]
|
||||
public uint ScriptId;
|
||||
|
||||
[FieldOffset(68)]
|
||||
[FieldOffset(72)]
|
||||
public string StringId;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public door Door;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public button Button;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public questgiver QuestGiver;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public chest Chest;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public binder Binder;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public generic Generic;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public trap Trap;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public chair Chair;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public spellFocus SpellFocus;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public text Text;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public goober Goober;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public transport Transport;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public areadamage AreaDamage;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public camera Camera;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public moTransport MoTransport;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public duelflag DuelFlag;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public fishingnode FishingNode;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public ritual Ritual;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public mailbox MailBox;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public guardpost GuardPost;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public spellcaster SpellCaster;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public meetingstone MeetingStone;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public flagstand FlagStand;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public fishinghole FishingHole;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public flagdrop FlagDrop;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public controlzone ControlZone;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public auraGenerator AuraGenerator;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public dungeonDifficulty DungeonDifficulty;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public barberChair BarberChair;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public destructiblebuilding DestructibleBuilding;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public guildbank GuildBank;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public trapDoor TrapDoor;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public newflag NewFlag;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public newflagdrop NewFlagDrop;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrisonbuilding GarrisonBuilding;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrisonplot GarrisonPlot;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public clientcreature ClientCreature;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public clientitem ClientItem;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public capturepoint CapturePoint;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public phaseablemo PhaseableMO;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrisonmonument GarrisonMonument;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrisonshipment GarrisonShipment;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrisonmonumentplaque GarrisonMonumentPlaque;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public itemforge ItemForge;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public uilink UILink;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public keystonereceptacle KeystoneReceptacle;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public gatheringnode GatheringNode;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public challengemodereward ChallengeModeReward;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public multi Multi;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public siegeableMulti SiegeableMulti;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public siegeableMO SiegeableMO;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public pvpReward PvpReward;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public playerchoicechest PlayerChoiceChest;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public legendaryforge LegendaryForge;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public garrtalenttree GarrTalentTree;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public weeklyrewardchest WeeklyRewardChest;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public clientmodel ClientModel;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public craftingTable CraftingTable;
|
||||
|
||||
[FieldOffset(72)]
|
||||
[FieldOffset(80)]
|
||||
public raw Raw;
|
||||
|
||||
[FieldOffset(208)]
|
||||
[FieldOffset(224)]
|
||||
public QueryGameObjectResponse QueryData;
|
||||
|
||||
// helpers
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2638,9 +2638,13 @@ namespace Game.Entities
|
||||
if (IsFriendlyTo(target) || target.IsFriendlyTo(this))
|
||||
return false;
|
||||
|
||||
Player playerAffectingAttacker = unit != null && unit.HasUnitFlag(UnitFlags.PlayerControlled) ? GetAffectingPlayer() : go != null ? GetAffectingPlayer() : null;
|
||||
Player playerAffectingAttacker = (unit != null && unit.HasUnitFlag(UnitFlags.PlayerControlled)) || go != null ? GetAffectingPlayer() : null;
|
||||
Player playerAffectingTarget = unitTarget != null && unitTarget.HasUnitFlag(UnitFlags.PlayerControlled) ? unitTarget.GetAffectingPlayer() : null;
|
||||
|
||||
// Pets of mounted players are immune to NPCs
|
||||
if (playerAffectingAttacker == null && unitTarget != null && unitTarget.IsPet() && playerAffectingTarget != null && playerAffectingTarget.IsMounted())
|
||||
return false;
|
||||
|
||||
// Not all neutral creatures can be attacked (even some unfriendly faction does not react aggresive to you, like Sporaggar)
|
||||
if ((playerAffectingAttacker && !playerAffectingTarget) || (!playerAffectingAttacker && playerAffectingTarget))
|
||||
{
|
||||
|
||||
@@ -176,6 +176,8 @@ namespace Game.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
owner.SetTemporaryUnsummonedPetNumber(0);
|
||||
|
||||
Map map = owner.GetMap();
|
||||
ulong guid = map.GenerateLowGuid(HighGuid.Pet);
|
||||
|
||||
@@ -290,9 +292,6 @@ namespace Game.Entities
|
||||
|
||||
Cypher.Assert(activePetIndex != -1);
|
||||
|
||||
// Check that we either have no pet (unsummoned by player) or it matches temporarily unsummoned pet by server (for example on flying mount)
|
||||
Cypher.Assert(!petStable.CurrentPetIndex.HasValue || petStable.CurrentPetIndex == activePetIndex);
|
||||
|
||||
petStable.SetCurrentActivePetIndex((uint)activePetIndex);
|
||||
}
|
||||
|
||||
@@ -384,6 +383,9 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
if (owner.IsMounted())
|
||||
owner.DisablePetControlsOnMount(ReactStates.Passive, CommandStates.Follow);
|
||||
|
||||
// must be after SetMinion (owner guid check)
|
||||
LoadTemplateImmunities();
|
||||
m_loading = false;
|
||||
@@ -458,7 +460,7 @@ namespace Game.Entities
|
||||
string actionBar = GenerateActionBarData();
|
||||
|
||||
Cypher.Assert(owner.GetPetStable().GetCurrentPet() != null && owner.GetPetStable().GetCurrentPet().PetNumber == GetCharmInfo().GetPetNumber());
|
||||
FillPetInfo(owner.GetPetStable().GetCurrentPet());
|
||||
FillPetInfo(owner.GetPetStable().GetCurrentPet(), owner.GetTemporaryPetReactState());
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CharStatements.INS_PET);
|
||||
stmt.AddValue(0, GetCharmInfo().GetPetNumber());
|
||||
@@ -467,7 +469,7 @@ namespace Game.Entities
|
||||
stmt.AddValue(3, GetNativeDisplayId());
|
||||
stmt.AddValue(4, GetLevel());
|
||||
stmt.AddValue(5, m_unitData.PetExperience);
|
||||
stmt.AddValue(6, (byte)GetReactState());
|
||||
stmt.AddValue(6, (byte)owner.GetTemporaryPetReactState().GetValueOrDefault(GetReactState()));
|
||||
stmt.AddValue(7, (owner.GetPetStable().GetCurrentActivePetIndex().HasValue ? (short)owner.GetPetStable().GetCurrentActivePetIndex().Value : (short)PetSaveMode.NotInSlot));
|
||||
stmt.AddValue(8, GetName());
|
||||
stmt.AddValue(9, HasPetFlag(UnitPetFlags.CanBeRenamed) ? 0 : 1);
|
||||
@@ -492,14 +494,14 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public void FillPetInfo(PetStable.PetInfo petInfo)
|
||||
public void FillPetInfo(PetStable.PetInfo petInfo, ReactStates? forcedReactState = null)
|
||||
{
|
||||
petInfo.PetNumber = GetCharmInfo().GetPetNumber();
|
||||
petInfo.CreatureId = GetEntry();
|
||||
petInfo.DisplayId = GetNativeDisplayId();
|
||||
petInfo.Level = (byte)GetLevel();
|
||||
petInfo.Experience = m_unitData.PetExperience;
|
||||
petInfo.ReactState = GetReactState();
|
||||
petInfo.ReactState = forcedReactState.GetValueOrDefault(GetReactState());
|
||||
petInfo.Name = GetName();
|
||||
petInfo.WasRenamed = !HasPetFlag(UnitPetFlags.CanBeRenamed);
|
||||
petInfo.Health = (uint)GetHealth();
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace Game.Entities
|
||||
PetStable m_petStable;
|
||||
public List<PetAura> m_petAuras = new();
|
||||
uint m_temporaryUnsummonedPetNumber;
|
||||
ReactStates? m_temporaryPetReactState;
|
||||
uint m_lastpetnumber;
|
||||
|
||||
// Player summoning
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace Game.Entities
|
||||
return nearMembers[randTarget];
|
||||
}
|
||||
|
||||
public PartyResult CanUninviteFromGroup(ObjectGuid guidMember = default)
|
||||
public PartyResult CanUninviteFromGroup(ObjectGuid guidMember, byte? partyIndex)
|
||||
{
|
||||
Group grp = GetGroup();
|
||||
Group grp = GetGroup(partyIndex);
|
||||
if (!grp)
|
||||
return PartyResult.NotInGroup;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Game.Entities
|
||||
return PartyResult.PartyLfgBootDungeonComplete;
|
||||
|
||||
Player player = Global.ObjAccessor.FindConnectedPlayer(guidMember);
|
||||
if (!player.m_lootRolls.Empty())
|
||||
if (player != null && !player.m_lootRolls.Empty())
|
||||
return PartyResult.PartyLfgBootLootRolls;
|
||||
|
||||
// @todo Should also be sent when anyone has recently left combat, with an aprox ~5 seconds timer.
|
||||
@@ -150,6 +150,23 @@ namespace Game.Entities
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Group GetGroup(byte? partyIndex)
|
||||
{
|
||||
Group group = GetGroup();
|
||||
if (!partyIndex.HasValue)
|
||||
return group;
|
||||
|
||||
GroupCategory category = (GroupCategory)partyIndex;
|
||||
if (group != null && group.GetGroupCategory() == category)
|
||||
return group;
|
||||
|
||||
Group originalGroup = GetOriginalGroup();
|
||||
if (originalGroup && originalGroup.GetGroupCategory() == category)
|
||||
return originalGroup;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void SetGroup(Group group, byte subgroup = 0)
|
||||
{
|
||||
@@ -167,10 +184,7 @@ namespace Game.Entities
|
||||
public void SetPartyType(GroupCategory category, GroupType type)
|
||||
{
|
||||
Cypher.Assert(category < GroupCategory.Max);
|
||||
byte value = m_playerData.PartyType;
|
||||
value &= (byte)~((byte)0xFF << ((byte)category * 4));
|
||||
value |= (byte)((byte)type << ((byte)category * 4));
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.PartyType), value);
|
||||
SetUpdateFieldValue(ref m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.PartyType, (int)category), (byte)type);
|
||||
}
|
||||
|
||||
public void ResetGroupUpdateSequenceIfNeeded(Group group)
|
||||
@@ -207,12 +221,19 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
public Group GetGroupInvite() { return m_groupInvite; }
|
||||
|
||||
public void SetGroupInvite(Group group) { m_groupInvite = group; }
|
||||
|
||||
public Group GetGroup() { return m_group.GetTarget(); }
|
||||
|
||||
public GroupReference GetGroupRef() { return m_group; }
|
||||
|
||||
public byte GetSubGroup() { return m_group.GetSubGroup(); }
|
||||
|
||||
public GroupUpdateFlags GetGroupUpdateFlag() { return m_groupUpdateMask; }
|
||||
|
||||
public void SetGroupUpdateFlag(GroupUpdateFlags flag) { m_groupUpdateMask |= flag; }
|
||||
|
||||
public void RemoveGroupUpdateFlag(GroupUpdateFlags flag) { m_groupUpdateMask &= ~flag; }
|
||||
|
||||
public Group GetOriginalGroup() { return m_originalGroup.GetTarget(); }
|
||||
|
||||
@@ -109,8 +109,8 @@ namespace Game.Entities
|
||||
m_questObjectiveCriteriaMgr = new QuestObjectiveCriteriaManager(this);
|
||||
m_sceneMgr = new SceneMgr(this);
|
||||
|
||||
m_bgBattlegroundQueueID[0] = new BgBattlegroundQueueID_Rec();
|
||||
m_bgBattlegroundQueueID[1] = new BgBattlegroundQueueID_Rec();
|
||||
for (var i = 0; i < SharedConst.MaxPlayerBGQueues; ++i)
|
||||
m_bgBattlegroundQueueID[i] = new BgBattlegroundQueueID_Rec();
|
||||
|
||||
m_bgData = new BGData();
|
||||
|
||||
@@ -1057,6 +1057,55 @@ namespace Game.Entities
|
||||
public void SetLastPetNumber(uint petnumber) { m_lastpetnumber = petnumber; }
|
||||
public uint GetTemporaryUnsummonedPetNumber() { return m_temporaryUnsummonedPetNumber; }
|
||||
public void SetTemporaryUnsummonedPetNumber(uint petnumber) { m_temporaryUnsummonedPetNumber = petnumber; }
|
||||
|
||||
public ReactStates? GetTemporaryPetReactState() { return m_temporaryPetReactState; }
|
||||
|
||||
public void DisablePetControlsOnMount(ReactStates reactState, CommandStates commandState)
|
||||
{
|
||||
Pet pet = GetPet();
|
||||
if (pet == null)
|
||||
return;
|
||||
|
||||
m_temporaryPetReactState = pet.GetReactState();
|
||||
pet.SetReactState(reactState);
|
||||
CharmInfo charmInfo = pet.GetCharmInfo();
|
||||
if (charmInfo != null)
|
||||
charmInfo.SetCommandState(commandState);
|
||||
|
||||
pet.GetMotionMaster().MoveFollow(this, SharedConst.PetFollowDist, pet.GetFollowAngle());
|
||||
|
||||
PetMode petMode = new();
|
||||
petMode.PetGUID = pet.GetGUID();
|
||||
petMode.ReactState = reactState;
|
||||
petMode.CommandState = commandState;
|
||||
petMode.Flag = 0;
|
||||
SendPacket(petMode);
|
||||
}
|
||||
|
||||
public void EnablePetControlsOnDismount()
|
||||
{
|
||||
Pet pet = GetPet();
|
||||
if (pet != null)
|
||||
{
|
||||
PetMode petMode = new();
|
||||
petMode.PetGUID = pet.GetGUID();
|
||||
if (m_temporaryPetReactState.HasValue)
|
||||
{
|
||||
petMode.ReactState = m_temporaryPetReactState.Value;
|
||||
pet.SetReactState(m_temporaryPetReactState.Value);
|
||||
}
|
||||
|
||||
CharmInfo charmInfo = pet.GetCharmInfo();
|
||||
if (charmInfo != null)
|
||||
petMode.CommandState = charmInfo.GetCommandState();
|
||||
|
||||
petMode.Flag = 0;
|
||||
SendPacket(petMode);
|
||||
}
|
||||
|
||||
m_temporaryPetReactState = null;
|
||||
}
|
||||
|
||||
public void UnsummonPetTemporaryIfAny()
|
||||
{
|
||||
Pet pet = GetPet();
|
||||
@@ -1091,7 +1140,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsPetNeedBeTemporaryUnsummoned()
|
||||
{
|
||||
return !IsInWorld || !IsAlive() || IsMounted();
|
||||
return !IsInWorld || !IsAlive() || HasUnitMovementFlag(MovementFlag.Flying) || HasExtraUnitMovementFlag2(MovementFlags3.AdvFlying);
|
||||
}
|
||||
|
||||
public void SendRemoveControlBar()
|
||||
@@ -6400,8 +6449,8 @@ namespace Game.Entities
|
||||
public void SendSellError(SellResult msg, Creature creature, ObjectGuid guid)
|
||||
{
|
||||
SellResponse sellResponse = new();
|
||||
sellResponse.VendorGUID = (creature ? creature.GetGUID() : ObjectGuid.Empty);
|
||||
sellResponse.ItemGUID = guid;
|
||||
sellResponse.VendorGUID = creature ? creature.GetGUID() : ObjectGuid.Empty;
|
||||
sellResponse.ItemGUIDs.Add(guid);
|
||||
sellResponse.Reason = msg;
|
||||
SendPacket(sellResponse);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace Game.Entities
|
||||
m_lifetime = duration;
|
||||
|
||||
if (m_type == TempSummonType.ManualDespawn)
|
||||
m_type = (duration == TimeSpan.Zero) ? TempSummonType.DeadDespawn : TempSummonType.TimedDespawn;
|
||||
m_type = (duration <= TimeSpan.Zero) ? TempSummonType.DeadDespawn : TempSummonType.TimedDespawn;
|
||||
|
||||
if (summoner != null && summoner.IsPlayer())
|
||||
{
|
||||
|
||||
@@ -1430,23 +1430,8 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
// unsummon pet
|
||||
Pet pet = player.GetPet();
|
||||
if (pet != null)
|
||||
{
|
||||
Battleground bg = ToPlayer().GetBattleground();
|
||||
// don't unsummon pet in arena but SetFlag UNIT_FLAG_STUNNED to disable pet's interface
|
||||
if (bg && bg.IsArena())
|
||||
pet.SetUnitFlag(UnitFlags.Stunned);
|
||||
else
|
||||
player.UnsummonPetTemporaryIfAny();
|
||||
}
|
||||
|
||||
// if we have charmed npc, stun him also (everywhere)
|
||||
Unit charm = player.GetCharmed();
|
||||
if (charm)
|
||||
if (charm.GetTypeId() == TypeId.Unit)
|
||||
charm.SetUnitFlag(UnitFlags.Stunned);
|
||||
// disable pet controls
|
||||
player.DisablePetControlsOnMount(ReactStates.Passive, CommandStates.Follow);
|
||||
|
||||
player.SendMovementSetCollisionHeight(player.GetCollisionHeight(), UpdateCollisionHeightReason.Mount);
|
||||
}
|
||||
@@ -1483,20 +1468,8 @@ namespace Game.Entities
|
||||
Player player = ToPlayer();
|
||||
if (player != null)
|
||||
{
|
||||
Pet pPet = player.GetPet();
|
||||
if (pPet != null)
|
||||
{
|
||||
if (pPet.HasUnitFlag(UnitFlags.Stunned) && !pPet.HasUnitState(UnitState.Stunned))
|
||||
pPet.RemoveUnitFlag(UnitFlags.Stunned);
|
||||
}
|
||||
else
|
||||
player.ResummonPetTemporaryUnSummonedIfAny();
|
||||
|
||||
// if we have charmed npc, remove stun also
|
||||
Unit charm = player.GetCharmed();
|
||||
if (charm)
|
||||
if (charm.GetTypeId() == TypeId.Unit && charm.HasUnitFlag(UnitFlags.Stunned) && !charm.HasUnitState(UnitState.Stunned))
|
||||
charm.RemoveUnitFlag(UnitFlags.Stunned);
|
||||
player.EnablePetControlsOnDismount();
|
||||
player.ResummonPetTemporaryUnSummonedIfAny();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -589,18 +589,39 @@ namespace Game.Entities
|
||||
return GetTransport();
|
||||
}
|
||||
|
||||
public void AtStartOfEncounter()
|
||||
public void AtStartOfEncounter(EncounterType type)
|
||||
{
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfEncounter);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case EncounterType.DungeonEncounter:
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfDungeonEncounter);
|
||||
break;
|
||||
case EncounterType.MythicPlusRun:
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.StartOfMythicPlusRun);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (IsAlive())
|
||||
Unit.ProcSkillsAndAuras(this, null, new ProcFlagsInit(ProcFlags.EncounterStart), new ProcFlagsInit(), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
||||
}
|
||||
|
||||
public void AtEndOfEncounter()
|
||||
public void AtEndOfEncounter(EncounterType type)
|
||||
{
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfEncounter);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case EncounterType.DungeonEncounter:
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfDungeonEncounter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
GetSpellHistory().ResetCooldowns(pair =>
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pair.Key, Difficulty.None);
|
||||
|
||||
@@ -188,6 +188,15 @@ namespace Game.Entities
|
||||
// We just remove the aura and the unapply handler will make the target leave the vehicle.
|
||||
// We don't need to iterate over Seats
|
||||
_me.RemoveAurasByType(AuraType.ControlVehicle);
|
||||
|
||||
// Aura script might cause the vehicle to be despawned in the middle of handling SPELL_AURA_CONTROL_VEHICLE removal
|
||||
// In that case, aura effect has already been unregistered but passenger may still be found in Seats
|
||||
foreach (var (_, seat) in Seats)
|
||||
{
|
||||
Unit passenger = Global.ObjAccessor.GetUnit(_me, seat.Passenger.Guid);
|
||||
if (passenger != null)
|
||||
passenger._ExitVehicle();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasEmptySeat(sbyte seatId)
|
||||
|
||||
@@ -106,10 +106,10 @@ namespace Game
|
||||
|
||||
public static void ChooseCreatureFlags(CreatureTemplate cInfo, out ulong npcFlag, out uint unitFlags, out uint unitFlags2, out uint unitFlags3, CreatureData data = null)
|
||||
{
|
||||
npcFlag = data != null && data.npcflag != 0 ? data.npcflag : cInfo.Npcflag;
|
||||
unitFlags = data != null && data.unit_flags != 0 ? data.unit_flags : (uint)cInfo.UnitFlags;
|
||||
unitFlags2 = data != null && data.unit_flags2 != 0 ? data.unit_flags2 : cInfo.UnitFlags2;
|
||||
unitFlags3 = data != null && data.unit_flags3 != 0 ? data.unit_flags3 : cInfo.UnitFlags3;
|
||||
npcFlag = data != null && data.npcflag.HasValue ? data.npcflag.Value : cInfo.Npcflag;
|
||||
unitFlags = data != null && data.unit_flags.HasValue ? data.unit_flags.Value : (uint)cInfo.UnitFlags;
|
||||
unitFlags2 = data != null && data.unit_flags2.HasValue ? data.unit_flags2.Value : cInfo.UnitFlags2;
|
||||
unitFlags3 = data != null && data.unit_flags3.HasValue ? data.unit_flags3.Value : cInfo.UnitFlags3;
|
||||
}
|
||||
|
||||
public static ResponseCodes CheckPlayerName(string name, Locale locale, bool create = false)
|
||||
@@ -3519,10 +3519,15 @@ namespace Game
|
||||
data.SpawnDifficulties = ParseSpawnDifficulties(result.Read<string>(15), "creature", guid, data.MapId, spawnMasks.LookupByKey(data.MapId));
|
||||
short gameEvent = result.Read<short>(16);
|
||||
data.poolId = result.Read<uint>(17);
|
||||
data.npcflag = result.Read<ulong>(18);
|
||||
data.unit_flags = result.Read<uint>(19);
|
||||
data.unit_flags2 = result.Read<uint>(20);
|
||||
data.unit_flags3 = result.Read<uint>(21);
|
||||
|
||||
if (!result.IsNull(18))
|
||||
data.npcflag = result.Read<ulong>(18);
|
||||
if (!result.IsNull(19))
|
||||
data.unit_flags = result.Read<uint>(19);
|
||||
if (!result.IsNull(20))
|
||||
data.unit_flags2 = result.Read<uint>(20);
|
||||
if (!result.IsNull(21))
|
||||
data.unit_flags3 = result.Read<uint>(21);
|
||||
|
||||
data.PhaseUseFlags = (PhaseUseFlagsValues)result.Read<byte>(22);
|
||||
data.PhaseId = result.Read<uint>(23);
|
||||
@@ -3636,25 +3641,34 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
uint disallowedUnitFlags = (uint)(cInfo.UnitFlags & ~UnitFlags.Allowed);
|
||||
if (disallowedUnitFlags != 0)
|
||||
if (data.unit_flags.HasValue)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags` {disallowedUnitFlags}, removing incorrect flag.");
|
||||
cInfo.UnitFlags &= UnitFlags.Allowed;
|
||||
uint disallowedUnitFlags = (data.unit_flags.Value & ~(uint)UnitFlags.Allowed);
|
||||
if (disallowedUnitFlags != 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags` {disallowedUnitFlags}, removing incorrect flag.");
|
||||
data.unit_flags = data.unit_flags & (uint)UnitFlags.Allowed;
|
||||
}
|
||||
}
|
||||
|
||||
uint disallowedUnitFlags2 = (cInfo.UnitFlags2 & ~(uint)UnitFlags2.Allowed);
|
||||
if (disallowedUnitFlags2 != 0)
|
||||
if (data.unit_flags2.HasValue)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags2` {disallowedUnitFlags2}, removing incorrect flag.");
|
||||
cInfo.UnitFlags2 &= (uint)UnitFlags2.Allowed;
|
||||
uint disallowedUnitFlags2 = (data.unit_flags2.Value & ~(uint)UnitFlags2.Allowed);
|
||||
if (disallowedUnitFlags2 != 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags2` {disallowedUnitFlags2}, removing incorrect flag.");
|
||||
data.unit_flags2 = data.unit_flags2 & (uint)UnitFlags2.Allowed;
|
||||
}
|
||||
}
|
||||
|
||||
uint disallowedUnitFlags3 = (cInfo.UnitFlags3 & ~(uint)UnitFlags3.Allowed);
|
||||
if (disallowedUnitFlags3 != 0)
|
||||
if (data.unit_flags3.HasValue)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags2` {disallowedUnitFlags3}, removing incorrect flag.");
|
||||
cInfo.UnitFlags3 &= (uint)UnitFlags3.Allowed;
|
||||
uint disallowedUnitFlags3 = (data.unit_flags3.Value & ~(uint)UnitFlags3.Allowed);
|
||||
if (disallowedUnitFlags3 != 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature_template` lists creature (Entry: {cInfo.Entry}) with disallowed `unit_flags2` {disallowedUnitFlags3}, removing incorrect flag.");
|
||||
data.unit_flags3 = data.unit_flags3 & (uint)UnitFlags3.Allowed;
|
||||
}
|
||||
}
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.CalculateCreatureZoneAreaData))
|
||||
@@ -4798,7 +4812,7 @@ namespace Game
|
||||
goInfo.entry, goInfo.type, N, dataN);
|
||||
}
|
||||
|
||||
List<Difficulty> ParseSpawnDifficulties(string difficultyString, string table, ulong spawnId, uint mapId, List<Difficulty> mapDifficulties)
|
||||
public List<Difficulty> ParseSpawnDifficulties(string difficultyString, string table, ulong spawnId, uint mapId, List<Difficulty> mapDifficulties)
|
||||
{
|
||||
List<Difficulty> difficulties = new();
|
||||
StringArray tokens = new(difficultyString, ',');
|
||||
|
||||
+55
-17
@@ -141,7 +141,7 @@ namespace Game.Groups
|
||||
stmt.AddValue(index++, m_targetIcons[5].GetRawValue());
|
||||
stmt.AddValue(index++, m_targetIcons[6].GetRawValue());
|
||||
stmt.AddValue(index++, m_targetIcons[7].GetRawValue());
|
||||
stmt.AddValue(index++, (byte)m_groupFlags);
|
||||
stmt.AddValue(index++, (ushort)m_groupFlags);
|
||||
stmt.AddValue(index++, (byte)m_dungeonDifficulty);
|
||||
stmt.AddValue(index++, (byte)m_raidDifficulty);
|
||||
stmt.AddValue(index++, (byte)m_legacyRaidDifficulty);
|
||||
@@ -181,7 +181,7 @@ namespace Game.Groups
|
||||
for (byte i = 0; i < MapConst.TargetIconsCount; ++i)
|
||||
m_targetIcons[i].SetRawValue(field.Read<byte[]>(4 + i));
|
||||
|
||||
m_groupFlags = (GroupFlags)field.Read<byte>(12);
|
||||
m_groupFlags = (GroupFlags)field.Read<ushort>(12);
|
||||
if (m_groupFlags.HasAnyFlag(GroupFlags.Raid))
|
||||
_initRaidSubGroupsCounter();
|
||||
|
||||
@@ -210,6 +210,9 @@ namespace Game.Groups
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_groupFlags.HasFlag(GroupFlags.EveryoneAssistant))
|
||||
memberFlags |= (byte)GroupMemberFlags.Assistant;
|
||||
|
||||
member.name = character.Name;
|
||||
member.race = character.RaceId;
|
||||
member._class = (byte)character.ClassId;
|
||||
@@ -234,7 +237,7 @@ namespace Game.Groups
|
||||
{
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_GROUP_TYPE);
|
||||
|
||||
stmt.AddValue(0, (byte)m_groupFlags);
|
||||
stmt.AddValue(0, (ushort)m_groupFlags);
|
||||
stmt.AddValue(1, m_dbStoreId);
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
@@ -253,7 +256,7 @@ namespace Game.Groups
|
||||
{
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_GROUP_TYPE);
|
||||
|
||||
stmt.AddValue(0, (byte)m_groupFlags);
|
||||
stmt.AddValue(0, (ushort)m_groupFlags);
|
||||
stmt.AddValue(1, m_dbStoreId);
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
@@ -275,7 +278,7 @@ namespace Game.Groups
|
||||
if (m_memberSlots.Count > 5)
|
||||
return; // What message error should we send?
|
||||
|
||||
m_groupFlags = GroupFlags.None;
|
||||
m_groupFlags &= ~GroupFlags.Raid;
|
||||
|
||||
m_subGroupsCounts = null;
|
||||
|
||||
@@ -283,7 +286,7 @@ namespace Game.Groups
|
||||
{
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_GROUP_TYPE);
|
||||
|
||||
stmt.AddValue(0, (byte)m_groupFlags);
|
||||
stmt.AddValue(0, (ushort)m_groupFlags);
|
||||
stmt.AddValue(1, m_dbStoreId);
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
@@ -631,7 +634,7 @@ namespace Game.Groups
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeLeader(ObjectGuid newLeaderGuid, sbyte partyIndex = 0)
|
||||
public void ChangeLeader(ObjectGuid newLeaderGuid)
|
||||
{
|
||||
var slot = _getMemberSlot(newLeaderGuid);
|
||||
if (slot == null)
|
||||
@@ -673,7 +676,7 @@ namespace Game.Groups
|
||||
|
||||
GroupNewLeader groupNewLeader = new();
|
||||
groupNewLeader.Name = m_leaderName;
|
||||
groupNewLeader.PartyIndex = partyIndex;
|
||||
groupNewLeader.PartyIndex = (sbyte)GetGroupCategory();
|
||||
BroadcastPacket(groupNewLeader, true);
|
||||
}
|
||||
|
||||
@@ -743,7 +746,7 @@ namespace Game.Groups
|
||||
Global.GroupMgr.RemoveGroup(this);
|
||||
}
|
||||
|
||||
public void SetTargetIcon(byte symbol, ObjectGuid target, ObjectGuid changedBy, sbyte partyIndex)
|
||||
public void SetTargetIcon(byte symbol, ObjectGuid target, ObjectGuid changedBy)
|
||||
{
|
||||
if (symbol >= MapConst.TargetIconsCount)
|
||||
return;
|
||||
@@ -752,25 +755,25 @@ namespace Game.Groups
|
||||
if (!target.IsEmpty())
|
||||
for (byte i = 0; i < MapConst.TargetIconsCount; ++i)
|
||||
if (m_targetIcons[i] == target)
|
||||
SetTargetIcon(i, ObjectGuid.Empty, changedBy, partyIndex);
|
||||
SetTargetIcon(i, ObjectGuid.Empty, changedBy);
|
||||
|
||||
m_targetIcons[symbol] = target;
|
||||
|
||||
SendRaidTargetUpdateSingle updateSingle = new();
|
||||
updateSingle.PartyIndex = partyIndex;
|
||||
updateSingle.PartyIndex = (sbyte)GetGroupCategory();
|
||||
updateSingle.Target = target;
|
||||
updateSingle.ChangedBy = changedBy;
|
||||
updateSingle.Symbol = (sbyte)symbol;
|
||||
BroadcastPacket(updateSingle, true);
|
||||
}
|
||||
|
||||
public void SendTargetIconList(WorldSession session, sbyte partyIndex)
|
||||
public void SendTargetIconList(WorldSession session)
|
||||
{
|
||||
if (session == null)
|
||||
return;
|
||||
|
||||
SendRaidTargetUpdateAll updateAll = new();
|
||||
updateAll.PartyIndex = partyIndex;
|
||||
updateAll.PartyIndex = (sbyte)GetGroupCategory();
|
||||
for (byte i = 0; i < MapConst.TargetIconsCount; i++)
|
||||
updateAll.TargetIcons.Add(i, m_targetIcons[i]);
|
||||
|
||||
@@ -1435,7 +1438,7 @@ namespace Game.Groups
|
||||
EndReadyCheck();
|
||||
}
|
||||
|
||||
public void StartReadyCheck(ObjectGuid starterGuid, sbyte partyIndex, TimeSpan duration)
|
||||
public void StartReadyCheck(ObjectGuid starterGuid, TimeSpan duration)
|
||||
{
|
||||
if (m_readyCheckStarted)
|
||||
return;
|
||||
@@ -1453,7 +1456,7 @@ namespace Game.Groups
|
||||
|
||||
ReadyCheckStarted readyCheckStarted = new();
|
||||
readyCheckStarted.PartyGUID = m_guid;
|
||||
readyCheckStarted.PartyIndex = partyIndex;
|
||||
readyCheckStarted.PartyIndex = (sbyte)GetGroupCategory();
|
||||
readyCheckStarted.InitiatorGUID = starterGuid;
|
||||
readyCheckStarted.Duration = (uint)duration.TotalMilliseconds;
|
||||
BroadcastPacket(readyCheckStarted, false);
|
||||
@@ -1554,11 +1557,11 @@ namespace Game.Groups
|
||||
SendRaidMarkersChanged();
|
||||
}
|
||||
|
||||
public void SendRaidMarkersChanged(WorldSession session = null, sbyte partyIndex = 0)
|
||||
public void SendRaidMarkersChanged(WorldSession session = null)
|
||||
{
|
||||
RaidMarkersChanged packet = new();
|
||||
|
||||
packet.PartyIndex = partyIndex;
|
||||
packet.PartyIndex = (sbyte)GetGroupCategory();
|
||||
packet.ActiveMarkers = m_activeMarkers;
|
||||
|
||||
for (byte i = 0; i < MapConst.RaidMarkersCount; i++)
|
||||
@@ -1843,6 +1846,41 @@ namespace Game.Groups
|
||||
foreach (MemberSlot member in m_memberSlots)
|
||||
ToggleGroupMemberFlag(member, GroupMemberFlags.Assistant, apply);
|
||||
|
||||
if (!IsBGGroup() && !IsBFGroup())
|
||||
{
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_GROUP_TYPE);
|
||||
|
||||
stmt.AddValue(0, (ushort)m_groupFlags);
|
||||
stmt.AddValue(1, m_dbStoreId);
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
}
|
||||
|
||||
SendUpdate();
|
||||
}
|
||||
|
||||
public bool IsRestrictPingsToAssistants()
|
||||
{
|
||||
return m_groupFlags.HasFlag(GroupFlags.RestrictPings);
|
||||
}
|
||||
|
||||
public void SetRestrictPingsToAssistants(bool restrictPingsToAssistants)
|
||||
{
|
||||
if (restrictPingsToAssistants)
|
||||
m_groupFlags |= GroupFlags.RestrictPings;
|
||||
else
|
||||
m_groupFlags &= ~GroupFlags.RestrictPings;
|
||||
|
||||
if (!IsBGGroup() && !IsBFGroup())
|
||||
{
|
||||
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_GROUP_TYPE);
|
||||
|
||||
stmt.AddValue(0, (ushort)m_groupFlags);
|
||||
stmt.AddValue(1, m_dbStoreId);
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
}
|
||||
|
||||
SendUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,17 +82,11 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
Group group = invitingPlayer.GetGroup();
|
||||
if (group != null && group.IsBGGroup())
|
||||
group = invitingPlayer.GetOriginalGroup();
|
||||
|
||||
Group group = invitingPlayer.GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
group = invitingPlayer.GetGroupInvite();
|
||||
|
||||
Group group2 = invitedPlayer.GetGroup();
|
||||
if (group2 != null && group2.IsBGGroup())
|
||||
group2 = invitedPlayer.GetOriginalGroup();
|
||||
|
||||
Group group2 = invitedPlayer.GetGroup(packet.PartyIndex);
|
||||
PartyInvite partyInvite;
|
||||
// player already in another group or invited
|
||||
if (group2 || invitedPlayer.GetGroupInvite())
|
||||
@@ -161,7 +155,10 @@ namespace Game
|
||||
void HandlePartyInviteResponse(PartyInviteResponse packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroupInvite();
|
||||
if (!group)
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (packet.PartyIndex != 0 && group.GetGroupCategory() != (GroupCategory)packet.PartyIndex)
|
||||
return;
|
||||
|
||||
if (packet.Accept)
|
||||
@@ -235,14 +232,14 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
PartyResult res = GetPlayer().CanUninviteFromGroup(packet.TargetGUID);
|
||||
PartyResult res = GetPlayer().CanUninviteFromGroup(packet.TargetGUID, packet.PartyIndex);
|
||||
if (res != PartyResult.Ok)
|
||||
{
|
||||
SendPartyResult(PartyOperation.UnInvite, "", res);
|
||||
return;
|
||||
}
|
||||
|
||||
Group grp = GetPlayer().GetGroup();
|
||||
Group grp = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
// grp is checked already above in CanUninviteFromGroup()
|
||||
Cypher.Assert(grp);
|
||||
|
||||
@@ -265,7 +262,7 @@ namespace Game
|
||||
void HandleSetPartyLeader(SetPartyLeader packet)
|
||||
{
|
||||
Player player = Global.ObjAccessor.FindConnectedPlayer(packet.TargetGUID);
|
||||
Group group = GetPlayer().GetGroup();
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
|
||||
if (!group || !player)
|
||||
return;
|
||||
@@ -274,7 +271,7 @@ namespace Game
|
||||
return;
|
||||
|
||||
// Everything's fine, accepted.
|
||||
group.ChangeLeader(packet.TargetGUID, packet.PartyIndex);
|
||||
group.ChangeLeader(packet.TargetGUID);
|
||||
group.SendUpdate();
|
||||
}
|
||||
|
||||
@@ -283,12 +280,12 @@ namespace Game
|
||||
{
|
||||
RoleChangedInform roleChangedInform = new();
|
||||
|
||||
Group group = GetPlayer().GetGroup();
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
byte oldRole = (byte)(group ? group.GetLfgRoles(packet.TargetGUID) : 0);
|
||||
if (oldRole == packet.Role)
|
||||
return;
|
||||
|
||||
roleChangedInform.PartyIndex = packet.PartyIndex;
|
||||
roleChangedInform.PartyIndex = (byte)group.GetGroupCategory();
|
||||
roleChangedInform.From = GetPlayer().GetGUID();
|
||||
roleChangedInform.ChangedUnit = packet.TargetGUID;
|
||||
roleChangedInform.OldRole = oldRole;
|
||||
@@ -306,7 +303,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.LeaveGroup)]
|
||||
void HandleLeaveGroup(LeaveGroup packet)
|
||||
{
|
||||
Group grp = GetPlayer().GetGroup();
|
||||
Group grp = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
Group grpInvite = GetPlayer().GetGroupInvite();
|
||||
if (grp == null && grpInvite == null)
|
||||
return;
|
||||
@@ -338,7 +335,7 @@ namespace Game
|
||||
{
|
||||
// not allowed to change
|
||||
/*
|
||||
Group group = GetPlayer().GetGroup();
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (!group)
|
||||
return;
|
||||
|
||||
@@ -376,14 +373,15 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.MinimapPing)]
|
||||
void HandleMinimapPing(MinimapPingClient packet)
|
||||
{
|
||||
if (!GetPlayer().GetGroup())
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
MinimapPing minimapPing = new();
|
||||
minimapPing.Sender = GetPlayer().GetGUID();
|
||||
minimapPing.PositionX = packet.PositionX;
|
||||
minimapPing.PositionY = packet.PositionY;
|
||||
GetPlayer().GetGroup().BroadcastPacket(minimapPing, true, -1, GetPlayer().GetGUID());
|
||||
group.BroadcastPacket(minimapPing, true, -1, GetPlayer().GetGUID());
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.RandomRoll)]
|
||||
@@ -398,12 +396,12 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.UpdateRaidTarget)]
|
||||
void HandleUpdateRaidTarget(UpdateRaidTarget packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (packet.Symbol == -1) // target icon request
|
||||
group.SendTargetIconList(this, packet.PartyIndex);
|
||||
group.SendTargetIconList(this);
|
||||
else // target icon update
|
||||
{
|
||||
if (group.IsRaidGroup() && !group.IsLeader(GetPlayer().GetGUID()) && !group.IsAssistant(GetPlayer().GetGUID()))
|
||||
@@ -416,7 +414,7 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
group.SetTargetIcon((byte)packet.Symbol, packet.Target, GetPlayer().GetGUID(), packet.PartyIndex);
|
||||
group.SetTargetIcon((byte)packet.Symbol, packet.Target, GetPlayer().GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,20 +445,20 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.RequestPartyJoinUpdates)]
|
||||
void HandleRequestPartyJoinUpdates(RequestPartyJoinUpdates packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
group.SendTargetIconList(this, packet.PartyIndex);
|
||||
group.SendRaidMarkersChanged(this, packet.PartyIndex);
|
||||
group.SendTargetIconList(this);
|
||||
group.SendRaidMarkersChanged(this);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.ChangeSubGroup, Processing = PacketProcessing.ThreadUnsafe)]
|
||||
void HandleChangeSubGroup(ChangeSubGroup packet)
|
||||
{
|
||||
// we will get correct for group here, so we don't have to check if group is BG raid
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (packet.NewSubGroup >= MapConst.MaxRaidSubGroups)
|
||||
@@ -479,8 +477,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SwapSubGroups, Processing = PacketProcessing.ThreadUnsafe)]
|
||||
void HandleSwapSubGroups(SwapSubGroups packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
ObjectGuid senderGuid = GetPlayer().GetGUID();
|
||||
@@ -493,8 +491,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SetAssistantLeader)]
|
||||
void HandleSetAssistantLeader(SetAssistantLeader packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (!group.IsLeader(GetPlayer().GetGUID()))
|
||||
@@ -506,8 +504,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SetPartyAssignment)]
|
||||
void HandleSetPartyAssignment(SetPartyAssignment packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
ObjectGuid senderGuid = GetPlayer().GetGUID();
|
||||
@@ -532,8 +530,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.DoReadyCheck)]
|
||||
void HandleDoReadyCheckOpcode(DoReadyCheck packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
/** error handling **/
|
||||
@@ -541,14 +539,14 @@ namespace Game
|
||||
return;
|
||||
|
||||
// everything's fine, do it
|
||||
group.StartReadyCheck(GetPlayer().GetGUID(), packet.PartyIndex, TimeSpan.FromMilliseconds(MapConst.ReadycheckDuration));
|
||||
group.StartReadyCheck(GetPlayer().GetGUID(), TimeSpan.FromMilliseconds(MapConst.ReadycheckDuration));
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.ReadyCheckResponse, Processing = PacketProcessing.Inplace)]
|
||||
void HandleReadyCheckResponseOpcode(ReadyCheckResponseClient packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
// everything's fine, do it
|
||||
@@ -596,8 +594,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.InitiateRolePoll)]
|
||||
void HandleInitiateRolePoll(InitiateRolePoll packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
ObjectGuid guid = GetPlayer().GetGUID();
|
||||
@@ -606,15 +604,15 @@ namespace Game
|
||||
|
||||
RolePollInform rolePollInform = new();
|
||||
rolePollInform.From = guid;
|
||||
rolePollInform.PartyIndex = packet.PartyIndex;
|
||||
rolePollInform.PartyIndex = (sbyte)group.GetGroupCategory();
|
||||
group.BroadcastPacket(rolePollInform, true);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SetEveryoneIsAssistant)]
|
||||
void HandleSetEveryoneIsAssistant(SetEveryoneIsAssistant packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
Group group = GetPlayer().GetGroup(packet.PartyIndex);
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (!group.IsLeader(GetPlayer().GetGUID()))
|
||||
@@ -627,7 +625,7 @@ namespace Game
|
||||
void HandleClearRaidMarker(ClearRaidMarker packet)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup();
|
||||
if (!group)
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
if (group.IsRaidGroup() && !group.IsLeader(GetPlayer().GetGUID()) && !group.IsAssistant(GetPlayer().GetGUID()))
|
||||
@@ -635,5 +633,92 @@ namespace Game
|
||||
|
||||
group.DeleteRaidMarker(packet.MarkerId);
|
||||
}
|
||||
|
||||
bool CanSendPing(Player player, PingSubjectType type, ref Group group)
|
||||
{
|
||||
if (type >= PingSubjectType.Max)
|
||||
return false;
|
||||
|
||||
if (!player.GetSession().CanSpeak())
|
||||
return false;
|
||||
|
||||
group = player.GetGroup();
|
||||
if (!group)
|
||||
return false;
|
||||
|
||||
if (group.IsRestrictPingsToAssistants() && !group.IsLeader(player.GetGUID()) && !group.IsAssistant(player.GetGUID()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SetRestrictPingsToAssistants)]
|
||||
void HandleSetRestrictPingsToAssistants(SetRestrictPingsToAssistants setRestrictPingsToAssistants)
|
||||
{
|
||||
Group group = GetPlayer().GetGroup(setRestrictPingsToAssistants.PartyIndex);
|
||||
if (!group)
|
||||
return;
|
||||
|
||||
if (!group.IsLeader(GetPlayer().GetGUID()))
|
||||
return;
|
||||
|
||||
group.SetRestrictPingsToAssistants(setRestrictPingsToAssistants.RestrictPingsToAssistants);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SendPingUnit)]
|
||||
void HandleSendPingUnit(SendPingUnit pingUnit)
|
||||
{
|
||||
Group group = null;
|
||||
if (!CanSendPing(_player, pingUnit.Type, ref group))
|
||||
return;
|
||||
|
||||
Unit target = Global.ObjAccessor.GetUnit(_player, pingUnit.TargetGUID);
|
||||
if (!target || !_player.HaveAtClient(target))
|
||||
return;
|
||||
|
||||
ReceivePingUnit broadcastPingUnit = new();
|
||||
broadcastPingUnit.SenderGUID = _player.GetGUID();
|
||||
broadcastPingUnit.TargetGUID = pingUnit.TargetGUID;
|
||||
broadcastPingUnit.Type = pingUnit.Type;
|
||||
broadcastPingUnit.PinFrameID = pingUnit.PinFrameID;
|
||||
broadcastPingUnit.Write();
|
||||
|
||||
for (GroupReference itr = group.GetFirstMember(); itr != null; itr = itr.Next())
|
||||
{
|
||||
Player member = itr.GetSource();
|
||||
if (_player == member || !_player.IsInMap(member))
|
||||
continue;
|
||||
|
||||
member.SendPacket(broadcastPingUnit);
|
||||
}
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SendPingWorldPoint)]
|
||||
void HandleSendPingWorldPoint(SendPingWorldPoint pingWorldPoint)
|
||||
{
|
||||
Group group = null;
|
||||
if (!CanSendPing(_player, pingWorldPoint.Type, ref group))
|
||||
return;
|
||||
|
||||
if (_player.GetMapId() != pingWorldPoint.MapID)
|
||||
return;
|
||||
|
||||
ReceivePingWorldPoint broadcastPingWorldPoint = new();
|
||||
broadcastPingWorldPoint.SenderGUID = _player.GetGUID();
|
||||
broadcastPingWorldPoint.MapID = pingWorldPoint.MapID;
|
||||
broadcastPingWorldPoint.Point = pingWorldPoint.Point;
|
||||
broadcastPingWorldPoint.Type = pingWorldPoint.Type;
|
||||
broadcastPingWorldPoint.PinFrameID = pingWorldPoint.PinFrameID;
|
||||
broadcastPingWorldPoint.Write();
|
||||
|
||||
for (GroupReference itr = group.GetFirstMember(); itr != null; itr = itr.Next())
|
||||
{
|
||||
Player member = itr.GetSource();
|
||||
if (_player == member || !_player.IsInMap(member))
|
||||
continue;
|
||||
|
||||
member.SendPacket(broadcastPingWorldPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,16 @@ namespace Game
|
||||
if (v.Value != PlayerSpellState.Removed)
|
||||
inspectResult.Talents.Add((ushort)v.Key);
|
||||
}
|
||||
|
||||
var pvpTalents = player.GetPvpTalentMap(player.GetActiveTalentGroup());
|
||||
for (int i = 0; i < pvpTalents.Length; ++i)
|
||||
inspectResult.PvpTalents[i] = (ushort)pvpTalents[i];
|
||||
|
||||
inspectResult.TalentTraits.Level = (int)player.GetLevel();
|
||||
inspectResult.TalentTraits.ChrSpecializationID = (int)player.GetPrimarySpecialization();
|
||||
TraitConfig traitConfig = player.GetTraitConfig((int)(uint)player.m_activePlayerData.ActiveCombatTraitConfigID);
|
||||
if (traitConfig != null)
|
||||
inspectResult.TalentTraits.Config = new TraitConfigPacket(traitConfig);
|
||||
}
|
||||
|
||||
Guild guild = Global.GuildMgr.GetGuildById(player.GetGuildId());
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Game
|
||||
foreach (var dungeonId in updateData.dungeons)
|
||||
lfgUpdateStatus.Slots.Add(Global.LFGMgr.GetLFGDungeonEntry(dungeonId));
|
||||
|
||||
lfgUpdateStatus.RequestedRoles = (uint)Global.LFGMgr.GetRoles(_player.GetGUID());
|
||||
lfgUpdateStatus.RequestedRoles = (byte)Global.LFGMgr.GetRoles(_player.GetGUID());
|
||||
//lfgUpdateStatus.SuspendedPlayers;
|
||||
lfgUpdateStatus.IsParty = party;
|
||||
lfgUpdateStatus.NotifyUI = true;
|
||||
@@ -480,7 +480,7 @@ namespace Game
|
||||
foreach (var pair in proposal.players)
|
||||
{
|
||||
var proposalPlayer = new LFGProposalUpdatePlayer();
|
||||
proposalPlayer.Roles = (uint)pair.Value.role;
|
||||
proposalPlayer.Roles = (byte)pair.Value.role;
|
||||
proposalPlayer.Me = (pair.Key == playerGuid);
|
||||
proposalPlayer.MyParty = !pair.Value.group.IsEmpty() && pair.Value.group == proposal.group;
|
||||
proposalPlayer.SameParty = !pair.Value.group.IsEmpty() && pair.Value.group == guildGuid;
|
||||
|
||||
@@ -138,6 +138,9 @@ namespace Game
|
||||
if (opcode == ClientOpcodes.MoveFallLand || opcode == ClientOpcodes.MoveStartSwim || opcode == ClientOpcodes.MoveSetFly)
|
||||
mover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.LandingOrFlight); // Parachutes
|
||||
|
||||
if (opcode == ClientOpcodes.MoveSetFly || opcode == ClientOpcodes.MoveSetAdvFly)
|
||||
_player.UnsummonPetTemporaryIfAny(); // always do the pet removal on current client activeplayer only
|
||||
|
||||
movementInfo.Guid = mover.GetGUID();
|
||||
movementInfo.Time = AdjustClientMovementTime(movementInfo.Time);
|
||||
mover.m_movementInfo = movementInfo;
|
||||
|
||||
@@ -40,6 +40,9 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.PetAction)]
|
||||
void HandlePetAction(PetAction packet)
|
||||
{
|
||||
if (_player.IsMounted())
|
||||
return;
|
||||
|
||||
ObjectGuid guid1 = packet.PetGUID; //pet guid
|
||||
ObjectGuid guid2 = packet.TargetGUID; //tag guid
|
||||
|
||||
|
||||
@@ -366,14 +366,14 @@ namespace Game.Maps
|
||||
InitializeCombatResurrections(1, resInterval);
|
||||
SendEncounterStart(1, 9, resInterval, resInterval);
|
||||
|
||||
instance.DoOnPlayers(player => player.AtStartOfEncounter());
|
||||
instance.DoOnPlayers(player => player.AtStartOfEncounter(EncounterType.DungeonEncounter));
|
||||
break;
|
||||
}
|
||||
case EncounterState.Fail:
|
||||
ResetCombatResurrections();
|
||||
SendEncounterEnd();
|
||||
|
||||
instance.DoOnPlayers(player => player.AtEndOfEncounter());
|
||||
instance.DoOnPlayers(player => player.AtEndOfEncounter(EncounterType.DungeonEncounter));
|
||||
break;
|
||||
case EncounterState.Done:
|
||||
ResetCombatResurrections();
|
||||
@@ -385,7 +385,7 @@ namespace Game.Maps
|
||||
SendBossKillCredit(dungeonEncounter.Id);
|
||||
}
|
||||
|
||||
instance.DoOnPlayers(player => player.AtEndOfEncounter());
|
||||
instance.DoOnPlayers(player => player.AtEndOfEncounter(EncounterType.DungeonEncounter));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Game.Maps
|
||||
public override void Visit(IList<AreaTrigger> objs)
|
||||
{
|
||||
CellCoord cellCoord = i_cell.GetCellCoord();
|
||||
SortedSet<ulong> areaTriggers = Global.AreaTriggerDataStorage.GetAreaTriggersForMapAndCell(i_map.GetId(), cellCoord.GetId());
|
||||
SortedSet<ulong> areaTriggers = Global.AreaTriggerDataStorage.GetAreaTriggersForMapAndCell(i_map.GetId(), i_map.GetDifficultyID(), cellCoord.GetId());
|
||||
if (areaTriggers == null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -5,32 +5,32 @@ using Framework.Constants;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Game.Miscellaneous
|
||||
{
|
||||
{
|
||||
public struct RaceMask
|
||||
{
|
||||
public static RaceMask<ulong> AllPlayable = new RaceMask<ulong>(
|
||||
public static RaceMask<ulong> AllPlayable = new RaceMask<ulong>((ulong)(
|
||||
RaceMask<ulong>.GetMaskForRace(Race.Human) | RaceMask<ulong>.GetMaskForRace(Race.Orc) | RaceMask<ulong>.GetMaskForRace(Race.Dwarf) | RaceMask<ulong>.GetMaskForRace(Race.NightElf) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.Undead) | RaceMask<ulong>.GetMaskForRace(Race.Tauren) | RaceMask<ulong>.GetMaskForRace(Race.Gnome) | RaceMask<ulong>.GetMaskForRace(Race.Troll) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.BloodElf) | RaceMask<ulong>.GetMaskForRace(Race.Draenei) | RaceMask<ulong>.GetMaskForRace(Race.Goblin) | RaceMask<ulong>.GetMaskForRace(Race.Worgen) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.PandarenNeutral) | RaceMask<ulong>.GetMaskForRace(Race.PandarenAlliance) | RaceMask<ulong>.GetMaskForRace(Race.PandarenHorde) | RaceMask<ulong>.GetMaskForRace(Race.Nightborne) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.HighmountainTauren) | RaceMask<ulong>.GetMaskForRace(Race.VoidElf) | RaceMask<ulong>.GetMaskForRace(Race.LightforgedDraenei) | RaceMask<ulong>.GetMaskForRace(Race.ZandalariTroll) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.KulTiran) | RaceMask<ulong>.GetMaskForRace(Race.DarkIronDwarf) | RaceMask<ulong>.GetMaskForRace(Race.Vulpera) | RaceMask<ulong>.GetMaskForRace(Race.MagharOrc) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.MechaGnome) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrAlliance) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrHorde));
|
||||
RaceMask<ulong>.GetMaskForRace(Race.MechaGnome) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrAlliance) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrHorde)));
|
||||
|
||||
public static RaceMask<ulong> Neutral = new RaceMask<ulong>((ulong)RaceMask<ulong>.GetMaskForRace(Race.PandarenNeutral));
|
||||
|
||||
public static RaceMask<ulong> Neutral = new(RaceMask<ulong>.GetMaskForRace(Race.PandarenNeutral));
|
||||
|
||||
public static RaceMask<ulong> Alliance = new(
|
||||
public static RaceMask<ulong> Alliance = new RaceMask<ulong>((ulong)(
|
||||
RaceMask<ulong>.GetMaskForRace(Race.Human) | RaceMask<ulong>.GetMaskForRace(Race.Dwarf) | RaceMask<ulong>.GetMaskForRace(Race.NightElf) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.Gnome) | RaceMask<ulong>.GetMaskForRace(Race.Draenei) | RaceMask<ulong>.GetMaskForRace(Race.Worgen) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.PandarenAlliance) | RaceMask<ulong>.GetMaskForRace(Race.VoidElf) | RaceMask<ulong>.GetMaskForRace(Race.LightforgedDraenei) |
|
||||
RaceMask<ulong>.GetMaskForRace(Race.KulTiran) | RaceMask<ulong>.GetMaskForRace(Race.DarkIronDwarf) | RaceMask<ulong>.GetMaskForRace(Race.MechaGnome) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrAlliance));
|
||||
RaceMask<ulong>.GetMaskForRace(Race.KulTiran) | RaceMask<ulong>.GetMaskForRace(Race.DarkIronDwarf) | RaceMask<ulong>.GetMaskForRace(Race.MechaGnome) | RaceMask<ulong>.GetMaskForRace(Race.DracthyrAlliance)));
|
||||
|
||||
public static RaceMask<ulong> Horde = new(AllPlayable.RawValue & ~(Neutral | Alliance).RawValue);
|
||||
public static RaceMask<ulong> Horde = new RaceMask<ulong>((ulong)(AllPlayable.RawValue & (~(Neutral | Alliance).RawValue)));
|
||||
}
|
||||
|
||||
public struct RaceMask<T> where T : unmanaged
|
||||
public struct RaceMask<T>
|
||||
{
|
||||
public T RawValue;
|
||||
public dynamic RawValue;
|
||||
|
||||
public RaceMask(T rawValue)
|
||||
{
|
||||
@@ -39,26 +39,21 @@ namespace Game.Miscellaneous
|
||||
|
||||
public bool HasRace(Race raceId)
|
||||
{
|
||||
return ((dynamic)RawValue & GetMaskForRace(raceId)) != 0;
|
||||
return (RawValue & GetMaskForRace(raceId)) != 0;
|
||||
}
|
||||
|
||||
public bool IsEmpty()
|
||||
{
|
||||
return RawValue == (dynamic)0;
|
||||
return RawValue == 0;
|
||||
}
|
||||
|
||||
public static RaceMask<T> operator &(RaceMask<T> left, RaceMask<T> right) { return new RaceMask<T>((dynamic)left.RawValue & right.RawValue); }
|
||||
public static RaceMask<T> operator |(RaceMask<T> left, RaceMask<T> right) { return new RaceMask<T>((dynamic)left.RawValue | right.RawValue); }
|
||||
|
||||
public static explicit operator T(RaceMask<T> raceMask)
|
||||
{
|
||||
return raceMask.RawValue;
|
||||
}
|
||||
public static RaceMask<T> operator &(RaceMask<T> left, RaceMask<T> right) { return new RaceMask<T>(left.RawValue & right.RawValue); }
|
||||
public static RaceMask<T> operator |(RaceMask<T> left, RaceMask<T> right) { return new RaceMask<T>(left.RawValue | right.RawValue); }
|
||||
|
||||
public static dynamic GetMaskForRace(Race raceId)
|
||||
{
|
||||
int raceBit = GetRaceBit(raceId);
|
||||
return (raceBit >= 0 && (uint)raceBit < Marshal.SizeOf<T>() * 8 ? (1 << raceBit) : 0);
|
||||
return (T)(dynamic)(raceBit >= 0 && (uint)raceBit < Marshal.SizeOf<T>() * 8 ? (1 << raceBit) : 0);
|
||||
}
|
||||
|
||||
static int GetRaceBit(Race raceId)
|
||||
|
||||
@@ -532,8 +532,8 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(RankID);
|
||||
_worldPacket.WriteInt32(WithdrawGoldLimit);
|
||||
_worldPacket.WriteInt32(Flags);
|
||||
_worldPacket.WriteInt32(WithdrawGoldLimit);
|
||||
_worldPacket.WriteInt32(NumTabs);
|
||||
_worldPacket.WriteInt32(Tab.Count);
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8((sbyte)BagResult);
|
||||
_worldPacket.WriteInt32((int)BagResult);
|
||||
_worldPacket.WritePackedGuid(Item[0]);
|
||||
_worldPacket.WritePackedGuid(Item[1]);
|
||||
_worldPacket.WriteUInt8(ContainerBSlot); // bag type subclass, used with EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM and EQUIP_ERR_WRONG_BAG_TYPE_2
|
||||
@@ -389,12 +389,14 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(VendorGUID);
|
||||
_worldPacket.WritePackedGuid(ItemGUID);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
_worldPacket.WriteInt32(ItemGUIDs.Count);
|
||||
_worldPacket.WriteInt32((int)Reason);
|
||||
foreach (ObjectGuid itemGuid in ItemGUIDs)
|
||||
_worldPacket.WritePackedGuid(itemGuid);
|
||||
}
|
||||
|
||||
public ObjectGuid VendorGUID;
|
||||
public ObjectGuid ItemGUID;
|
||||
public List<ObjectGuid> ItemGUIDs = new();
|
||||
public SellResult Reason = SellResult.Unk;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,18 +16,21 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
QueueAsGroup = _worldPacket.HasBit();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Unknown = _worldPacket.HasBit();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
Roles = (LfgRoles)_worldPacket.ReadUInt32();
|
||||
|
||||
var slotsCount = _worldPacket.ReadInt32();
|
||||
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
|
||||
for (var i = 0; i < slotsCount; ++i) // Slots
|
||||
Slots.Add(_worldPacket.ReadUInt32());
|
||||
}
|
||||
|
||||
public bool QueueAsGroup;
|
||||
bool Unknown; // Always false in 7.2.5
|
||||
public byte PartyIndex;
|
||||
public bool Unknown; // Always false in 7.2.5
|
||||
public byte? PartyIndex;
|
||||
public LfgRoles Roles;
|
||||
public List<uint> Slots = new();
|
||||
}
|
||||
@@ -68,12 +71,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
RolesDesired = (LfgRoles)_worldPacket.ReadUInt32();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public LfgRoles RolesDesired;
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class DFBootPlayerVote : ClientPacket
|
||||
@@ -107,10 +112,11 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
Player = _worldPacket.HasBit();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public bool Player;
|
||||
}
|
||||
|
||||
@@ -163,7 +169,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt8(SubType);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteInt32(Slots.Count);
|
||||
_worldPacket.WriteUInt32(RequestedRoles);
|
||||
_worldPacket.WriteUInt8(RequestedRoles);
|
||||
_worldPacket.WriteInt32(SuspendedPlayers.Count);
|
||||
_worldPacket.WriteUInt32(QueueMapID);
|
||||
|
||||
@@ -186,7 +192,7 @@ namespace Game.Networking.Packets
|
||||
public byte SubType;
|
||||
public byte Reason;
|
||||
public List<uint> Slots = new();
|
||||
public uint RequestedRoles;
|
||||
public byte RequestedRoles;
|
||||
public List<ObjectGuid> SuspendedPlayers = new();
|
||||
public uint QueueMapID;
|
||||
public bool NotifyUI;
|
||||
@@ -204,7 +210,7 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
_worldPacket.WriteUInt32((uint)RoleMask);
|
||||
_worldPacket.WriteUInt8((byte)RoleMask);
|
||||
_worldPacket.WriteBit(Accepted);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -497,7 +503,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Mask);
|
||||
data.WriteUInt8(Mask);
|
||||
data.WriteUInt32(RewardMoney);
|
||||
data.WriteUInt32(RewardXP);
|
||||
data.WriteInt32(Item.Count);
|
||||
@@ -544,7 +550,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(Honor.Value);
|
||||
}
|
||||
|
||||
public uint Mask;
|
||||
public byte Mask;
|
||||
public uint RewardMoney;
|
||||
public uint RewardXP;
|
||||
public List<LfgPlayerQuestRewardItem> Item = new();
|
||||
@@ -608,7 +614,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public class LFGRoleCheckUpdateMember
|
||||
{
|
||||
public LFGRoleCheckUpdateMember(ObjectGuid guid, uint rolesDesired, byte level, bool roleCheckComplete)
|
||||
public LFGRoleCheckUpdateMember(ObjectGuid guid, byte rolesDesired, byte level, bool roleCheckComplete)
|
||||
{
|
||||
Guid = guid;
|
||||
RolesDesired = rolesDesired;
|
||||
@@ -619,14 +625,14 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(Guid);
|
||||
data.WriteUInt32(RolesDesired);
|
||||
data.WriteUInt8(RolesDesired);
|
||||
data.WriteUInt8(Level);
|
||||
data.WriteBit(RoleCheckComplete);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
public uint RolesDesired;
|
||||
public byte RolesDesired;
|
||||
public byte Level;
|
||||
public bool RoleCheckComplete;
|
||||
}
|
||||
@@ -723,7 +729,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Roles);
|
||||
data.WriteUInt8(Roles);
|
||||
data.WriteBit(Me);
|
||||
data.WriteBit(SameParty);
|
||||
data.WriteBit(MyParty);
|
||||
@@ -732,7 +738,7 @@ namespace Game.Networking.Packets
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public uint Roles;
|
||||
public byte Roles;
|
||||
public bool Me;
|
||||
public bool SameParty;
|
||||
public bool MyParty;
|
||||
|
||||
@@ -754,14 +754,16 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Min = _worldPacket.ReadUInt32();
|
||||
Max = _worldPacket.ReadUInt32();
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public uint Min;
|
||||
public uint Max;
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
public class RandomRoll : ServerPacket
|
||||
|
||||
@@ -8,6 +8,7 @@ using Game.Groups;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
@@ -39,8 +40,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
|
||||
_worldPacket.ResetBitPos();
|
||||
uint targetNameLen = _worldPacket.ReadBits<uint>(9);
|
||||
uint targetRealmLen = _worldPacket.ReadBits<uint>(9);
|
||||
|
||||
@@ -49,9 +51,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
TargetName = _worldPacket.ReadString(targetNameLen);
|
||||
TargetRealm = _worldPacket.ReadString(targetRealmLen);
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public uint ProposedRoles;
|
||||
public string TargetName;
|
||||
public string TargetRealm;
|
||||
@@ -70,7 +74,7 @@ namespace Game.Networking.Packets
|
||||
InviterGUID = inviter.GetGUID();
|
||||
InviterBNetAccountId = inviter.GetSession().GetAccountGUID();
|
||||
|
||||
ProposedRoles = proposedRoles;
|
||||
ProposedRoles = (byte)proposedRoles;
|
||||
|
||||
var realm = Global.WorldMgr.GetRealm();
|
||||
InviterRealm = new VirtualRealmInfo(realm.Id.GetAddress(), true, false, realm.Name, realm.NormalizedName);
|
||||
@@ -91,7 +95,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(InviterGUID);
|
||||
_worldPacket.WritePackedGuid(InviterBNetAccountId);
|
||||
_worldPacket.WriteUInt16(Unk1);
|
||||
_worldPacket.WriteUInt32(ProposedRoles);
|
||||
_worldPacket.WriteUInt8(ProposedRoles);
|
||||
_worldPacket.WriteInt32(LfgSlots.Count);
|
||||
_worldPacket.WriteInt32(LfgCompletedMask);
|
||||
|
||||
@@ -119,7 +123,7 @@ namespace Game.Networking.Packets
|
||||
public bool IsXRealm;
|
||||
|
||||
// Lfg
|
||||
public uint ProposedRoles;
|
||||
public byte ProposedRoles;
|
||||
public int LfgCompletedMask;
|
||||
public List<int> LfgSlots = new();
|
||||
}
|
||||
@@ -130,18 +134,21 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Accept = _worldPacket.HasBit();
|
||||
|
||||
bool hasRolesDesired = _worldPacket.HasBit();
|
||||
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
|
||||
if (hasRolesDesired)
|
||||
RolesDesired = _worldPacket.ReadUInt32();
|
||||
RolesDesired = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public bool Accept;
|
||||
public uint? RolesDesired;
|
||||
public byte? RolesDesired;
|
||||
}
|
||||
|
||||
class PartyUninvite : ClientPacket
|
||||
@@ -150,14 +157,18 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
byte reasonLen = _worldPacket.ReadBits<byte>(8);
|
||||
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
|
||||
byte reasonLen = _worldPacket.ReadBits<byte>(8);
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
|
||||
Reason = _worldPacket.ReadString(reasonLen);
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
public string Reason;
|
||||
}
|
||||
@@ -192,11 +203,13 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
}
|
||||
|
||||
@@ -265,8 +278,8 @@ namespace Game.Networking.Packets
|
||||
MemberStats.PositionZ = (short)(player.GetPositionZ());
|
||||
|
||||
MemberStats.SpecID = (ushort)player.GetPrimarySpecialization();
|
||||
MemberStats.PartyType[0] = (sbyte)(player.m_playerData.PartyType & 0xF);
|
||||
MemberStats.PartyType[1] = (sbyte)(player.m_playerData.PartyType >> 4);
|
||||
MemberStats.PartyType[0] = player.m_playerData.PartyType[0];
|
||||
MemberStats.PartyType[1] = player.m_playerData.PartyType[1];
|
||||
MemberStats.WmoGroupID = 0;
|
||||
MemberStats.WmoDoodadPlacementID = 0;
|
||||
|
||||
@@ -356,11 +369,13 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
}
|
||||
|
||||
@@ -370,14 +385,16 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
Role = _worldPacket.ReadInt32();
|
||||
Role = _worldPacket.ReadUInt8();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid TargetGUID;
|
||||
public int Role;
|
||||
public byte Role;
|
||||
}
|
||||
|
||||
class RoleChangedInform : ServerPacket
|
||||
@@ -386,18 +403,18 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8(PartyIndex);
|
||||
_worldPacket.WriteUInt8(PartyIndex);
|
||||
_worldPacket.WritePackedGuid(From);
|
||||
_worldPacket.WritePackedGuid(ChangedUnit);
|
||||
_worldPacket.WriteInt32(OldRole);
|
||||
_worldPacket.WriteInt32(NewRole);
|
||||
_worldPacket.WriteUInt8(OldRole);
|
||||
_worldPacket.WriteUInt8(NewRole);
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte PartyIndex;
|
||||
public ObjectGuid From;
|
||||
public ObjectGuid ChangedUnit;
|
||||
public int OldRole;
|
||||
public int NewRole;
|
||||
public byte OldRole;
|
||||
public byte NewRole;
|
||||
}
|
||||
|
||||
class LeaveGroup : ClientPacket
|
||||
@@ -406,10 +423,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class GroupDestroyed : ServerPacket
|
||||
@@ -425,13 +443,15 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
LootMethod = (LootMethod)_worldPacket.ReadUInt8();
|
||||
LootMasterGUID = _worldPacket.ReadPackedGuid();
|
||||
LootThreshold = (ItemQuality)_worldPacket.ReadUInt32();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid LootMasterGUID;
|
||||
public LootMethod LootMethod;
|
||||
public ItemQuality LootThreshold;
|
||||
@@ -443,12 +463,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
PositionX = _worldPacket.ReadFloat();
|
||||
PositionY = _worldPacket.ReadFloat();
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public float PositionX;
|
||||
public float PositionY;
|
||||
}
|
||||
@@ -475,12 +497,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
Symbol = _worldPacket.ReadInt8();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid Target;
|
||||
public sbyte Symbol;
|
||||
}
|
||||
@@ -542,10 +566,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class SetAssistantLeader : ClientPacket
|
||||
@@ -554,13 +579,15 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Apply = _worldPacket.HasBit();
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public ObjectGuid Target;
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public bool Apply;
|
||||
}
|
||||
|
||||
@@ -570,14 +597,16 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
Set = _worldPacket.HasBit();
|
||||
Assignment = _worldPacket.ReadUInt8();
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
Set = _worldPacket.HasBit();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte Assignment;
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public ObjectGuid Target;
|
||||
public bool Set;
|
||||
}
|
||||
@@ -588,10 +617,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class ReadyCheckStarted : ServerPacket
|
||||
@@ -618,11 +648,12 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
IsReady = _worldPacket.HasBit();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public bool IsReady;
|
||||
}
|
||||
|
||||
@@ -683,10 +714,11 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class RolePollInform : ServerPacket
|
||||
@@ -775,11 +807,13 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
EveryoneIsAssistant = _worldPacket.HasBit();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public bool EveryoneIsAssistant;
|
||||
}
|
||||
|
||||
@@ -790,12 +824,13 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
NewSubGroup = _worldPacket.ReadUInt8();
|
||||
if (_worldPacket.HasBit())
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public ObjectGuid TargetGUID;
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
public byte NewSubGroup;
|
||||
}
|
||||
|
||||
@@ -805,14 +840,16 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
PartyIndex = _worldPacket.ReadInt8();
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
FirstTarget = _worldPacket.ReadPackedGuid();
|
||||
SecondTarget = _worldPacket.ReadPackedGuid();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public ObjectGuid FirstTarget;
|
||||
public ObjectGuid SecondTarget;
|
||||
public sbyte PartyIndex;
|
||||
public byte? PartyIndex;
|
||||
}
|
||||
|
||||
class ClearRaidMarker : ClientPacket
|
||||
@@ -893,7 +930,113 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SetRestrictPingsToAssistants : ClientPacket
|
||||
{
|
||||
public byte? PartyIndex;
|
||||
public bool RestrictPingsToAssistants;
|
||||
|
||||
public SetRestrictPingsToAssistants(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.HasBit();
|
||||
RestrictPingsToAssistants = _worldPacket.HasBit();
|
||||
if (hasPartyIndex)
|
||||
PartyIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
}
|
||||
|
||||
class SendPingUnit : ClientPacket
|
||||
{
|
||||
public ObjectGuid SenderGUID;
|
||||
public ObjectGuid TargetGUID;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
|
||||
public SendPingUnit(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
SenderGUID = _worldPacket.ReadPackedGuid();
|
||||
TargetGUID = _worldPacket.ReadPackedGuid();
|
||||
Type = (PingSubjectType)_worldPacket.ReadUInt8();
|
||||
PinFrameID = _worldPacket.ReadUInt32();
|
||||
}
|
||||
}
|
||||
|
||||
class ReceivePingUnit : ServerPacket
|
||||
{
|
||||
public ObjectGuid SenderGUID;
|
||||
public ObjectGuid TargetGUID;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
|
||||
public ReceivePingUnit() : base(ServerOpcodes.ReceivePingUnit) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WritePackedGuid(TargetGUID);
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteUInt32(PinFrameID);
|
||||
}
|
||||
}
|
||||
|
||||
class SendPingWorldPoint : ClientPacket
|
||||
{
|
||||
public ObjectGuid SenderGUID;
|
||||
public uint MapID;
|
||||
public Vector3 Point;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
|
||||
public SendPingWorldPoint(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
SenderGUID = _worldPacket.ReadPackedGuid();
|
||||
MapID = _worldPacket.ReadUInt32();
|
||||
Point = _worldPacket.ReadVector3();
|
||||
Type = (PingSubjectType)_worldPacket.ReadUInt8();
|
||||
PinFrameID = _worldPacket.ReadUInt32();
|
||||
}
|
||||
}
|
||||
|
||||
class ReceivePingWorldPoint : ServerPacket
|
||||
{
|
||||
public ObjectGuid SenderGUID;
|
||||
public uint MapID = 0;
|
||||
public Vector3 Point;
|
||||
public PingSubjectType Type = PingSubjectType.Max;
|
||||
public uint PinFrameID;
|
||||
|
||||
public ReceivePingWorldPoint() : base(ServerOpcodes.ReceivePingWorldPoint) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WriteUInt32(MapID);
|
||||
_worldPacket.WriteVector3(Point);
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteUInt32(PinFrameID);
|
||||
}
|
||||
}
|
||||
|
||||
class CancelPingPin : ServerPacket
|
||||
{
|
||||
public ObjectGuid SenderGUID;
|
||||
public uint PinFrameID;
|
||||
|
||||
public CancelPingPin() : base(ServerOpcodes.CancelPingPin) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WriteUInt32(PinFrameID);
|
||||
}
|
||||
}
|
||||
|
||||
//Structs
|
||||
public struct PartyMemberPhase
|
||||
{
|
||||
@@ -931,7 +1074,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
class PartyMemberAuraStates
|
||||
{
|
||||
{
|
||||
public int SpellID;
|
||||
public ushort Flags;
|
||||
public uint ActiveFlags;
|
||||
@@ -993,7 +1136,7 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
for (byte i = 0; i < 2; i++)
|
||||
data.WriteInt8(PartyType[i]);
|
||||
data.WriteUInt8(PartyType[i]);
|
||||
|
||||
data.WriteInt16((short)Status);
|
||||
data.WriteUInt8(PowerType);
|
||||
@@ -1053,7 +1196,7 @@ namespace Game.Networking.Packets
|
||||
public ushort SpecID;
|
||||
public ushort WmoGroupID;
|
||||
public uint WmoDoodadPlacementID;
|
||||
public sbyte[] PartyType = new sbyte[2];
|
||||
public byte[] PartyType = new byte[2];
|
||||
public CTROptions ChromieTime;
|
||||
public DungeonScoreSummary DungeonScore = new();
|
||||
}
|
||||
|
||||
@@ -337,6 +337,23 @@ namespace Game.Networking.Packets
|
||||
|
||||
public byte Result;
|
||||
}
|
||||
|
||||
class PetMode : ServerPacket
|
||||
{
|
||||
public ObjectGuid PetGUID;
|
||||
public ReactStates ReactState;
|
||||
public CommandStates CommandState;
|
||||
public byte Flag;
|
||||
|
||||
public PetMode() : base(ServerOpcodes.PetMode, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(PetGUID);
|
||||
_worldPacket.WriteUInt16((ushort)((int)CommandState | Flag << 8));
|
||||
_worldPacket.WriteUInt8((byte)ReactState);
|
||||
}
|
||||
}
|
||||
|
||||
//Structs
|
||||
public class PetSpellCooldown
|
||||
|
||||
@@ -1753,11 +1753,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits((byte)Reason, 4);
|
||||
data.WriteUInt8((byte)Reason);
|
||||
if (Reason == SpellMissInfo.Reflect)
|
||||
data.WriteBits(ReflectStatus, 4);
|
||||
|
||||
data.FlushBits();
|
||||
data.WriteUInt8((byte)ReflectStatus);
|
||||
}
|
||||
|
||||
public SpellMissInfo Reason;
|
||||
@@ -1805,18 +1803,6 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public struct SpellAmmo
|
||||
{
|
||||
public int DisplayID;
|
||||
public sbyte InventoryType;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(DisplayID);
|
||||
data.WriteInt8(InventoryType);
|
||||
}
|
||||
}
|
||||
|
||||
public struct CreatureImmunities
|
||||
{
|
||||
public uint School;
|
||||
@@ -1861,7 +1847,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
MissileTrajectory.Write(data);
|
||||
|
||||
data.WriteInt32(Ammo.DisplayID);
|
||||
data.WriteInt32(AmmoDisplayID);
|
||||
data.WriteUInt8(DestLocSpellCastIndex);
|
||||
|
||||
Immunities.Write(data);
|
||||
@@ -1876,9 +1862,6 @@ namespace Game.Networking.Packets
|
||||
data.WriteBits(TargetPoints.Count, 16);
|
||||
data.FlushBits();
|
||||
|
||||
foreach (SpellMissStatus missStatus in MissStatus)
|
||||
missStatus.Write(data);
|
||||
|
||||
Target.Write(data);
|
||||
|
||||
foreach (ObjectGuid hitTarget in HitTargets)
|
||||
@@ -1890,6 +1873,9 @@ namespace Game.Networking.Packets
|
||||
foreach (SpellHitStatus hitStatus in HitStatus)
|
||||
hitStatus.Write(data);
|
||||
|
||||
foreach (SpellMissStatus missStatus in MissStatus)
|
||||
missStatus.Write(data);
|
||||
|
||||
foreach (SpellPowerData power in RemainingPower)
|
||||
power.Write(data);
|
||||
|
||||
@@ -1917,7 +1903,7 @@ namespace Game.Networking.Packets
|
||||
public List<SpellPowerData> RemainingPower = new();
|
||||
public RuneData RemainingRunes;
|
||||
public MissileTrajectoryResult MissileTrajectory;
|
||||
public SpellAmmo Ammo;
|
||||
public int AmmoDisplayID;
|
||||
public byte DestLocSpellCastIndex;
|
||||
public List<TargetLocation> TargetPoints = new();
|
||||
public CreatureImmunities Immunities;
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(AddonsDisabled);
|
||||
_worldPacket.WriteBit(Unused1000);
|
||||
_worldPacket.WriteBit(ContentTrackingEnabled);
|
||||
_worldPacket.WriteBit(IsSellAllJunkEnabled);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -178,6 +179,7 @@ namespace Game.Networking.Packets
|
||||
public bool AddonsDisabled;
|
||||
public bool Unused1000;
|
||||
public bool ContentTrackingEnabled;
|
||||
public bool IsSellAllJunkEnabled;
|
||||
|
||||
public SocialQueueConfig QuickJoinConfig;
|
||||
public SquelchInfo Squelch;
|
||||
@@ -272,6 +274,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteBit(AccountSaveDataExportEnabled);
|
||||
_worldPacket.WriteBit(AccountLockedByExport);
|
||||
_worldPacket.WriteBit(!RealmHiddenAlert.IsEmpty());
|
||||
|
||||
if (!RealmHiddenAlert.IsEmpty())
|
||||
_worldPacket.WriteBits(RealmHiddenAlert.GetByteCount() + 1, 11);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -299,6 +305,9 @@ namespace Game.Networking.Packets
|
||||
if (LaunchETA.HasValue)
|
||||
_worldPacket.WriteInt32(LaunchETA.Value);
|
||||
|
||||
if (!RealmHiddenAlert.IsEmpty())
|
||||
_worldPacket.WriteString(RealmHiddenAlert);
|
||||
|
||||
foreach (var sourceRegion in LiveRegionCharacterCopySourceRegions)
|
||||
_worldPacket.WriteInt32(sourceRegion);
|
||||
|
||||
@@ -349,6 +358,7 @@ namespace Game.Networking.Packets
|
||||
public int? LaunchETA;
|
||||
public List<DebugTimeEventInfo> DebugTimeEvents = new();
|
||||
public int Unused1007;
|
||||
public string RealmHiddenAlert;
|
||||
}
|
||||
|
||||
public class MOTD : ServerPacket
|
||||
|
||||
@@ -156,6 +156,7 @@ namespace Game.Scripting
|
||||
case "ConversationScript":
|
||||
case "AchievementScript":
|
||||
case "BattlefieldScript":
|
||||
case "EventScript":
|
||||
if (!attribute.Name.IsEmpty())
|
||||
name = attribute.Name;
|
||||
|
||||
|
||||
@@ -3860,9 +3860,10 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSpellCastDataAmmo(castData.Ammo);
|
||||
if (castFlags.HasFlag(SpellCastFlags.Projectile))
|
||||
castData.AmmoDisplayID = (int)GetSpellCastDataAmmo();
|
||||
|
||||
if (castFlags.HasAnyFlag(SpellCastFlags.Immunity))
|
||||
if (castFlags.HasFlag(SpellCastFlags.Immunity))
|
||||
{
|
||||
castData.Immunities.School = schoolImmunityMask;
|
||||
castData.Immunities.Value = (uint)mechanicImmunityMask;
|
||||
@@ -4010,7 +4011,7 @@ namespace Game.Spells
|
||||
m_channelTargetEffectMask = 0;
|
||||
}
|
||||
|
||||
void UpdateSpellCastDataAmmo(SpellAmmo ammo)
|
||||
uint GetSpellCastDataAmmo()
|
||||
{
|
||||
InventoryType ammoInventoryType = 0;
|
||||
uint ammoDisplayID = 0;
|
||||
@@ -4084,8 +4085,7 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
ammo.DisplayID = (int)ammoDisplayID;
|
||||
ammo.InventoryType = (sbyte)ammoInventoryType;
|
||||
return ammoDisplayID;
|
||||
}
|
||||
|
||||
void SendSpellExecuteLog()
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Scripts.Smart
|
||||
{
|
||||
public SmartEventTrigger() : base("SmartEventTrigger") { }
|
||||
|
||||
void OnTrigger(WorldObject obj, WorldObject invoker, uint eventId)
|
||||
public override void OnTrigger(WorldObject obj, WorldObject invoker, uint eventId)
|
||||
{
|
||||
Log.outDebug(LogFilter.ScriptsAi, $"Event {eventId} is using SmartEventTrigger script");
|
||||
SmartScript script = new();
|
||||
|
||||
@@ -824,7 +824,7 @@ namespace Scripts.Spells.Priest
|
||||
uint _damageSpellId;
|
||||
uint _healingSpellId;
|
||||
|
||||
spell_pri_penance(uint damageSpellId, uint healingSpellId)
|
||||
public spell_pri_penance(uint damageSpellId, uint healingSpellId)
|
||||
{
|
||||
_damageSpellId = damageSpellId;
|
||||
_healingSpellId = healingSpellId;
|
||||
@@ -862,9 +862,9 @@ namespace Scripts.Spells.Priest
|
||||
if (target)
|
||||
{
|
||||
if (caster.IsFriendlyTo(target))
|
||||
caster.CastSpell(target, _healingSpellId, new CastSpellExtraArgs().SetTriggeringSpell(GetSpell()));
|
||||
caster.CastSpell(target, _healingSpellId, new CastSpellExtraArgs(TriggerCastFlags.IgnoreGCD | TriggerCastFlags.IgnoreSpellAndCategoryCD).SetTriggeringSpell(GetSpell()));
|
||||
else
|
||||
caster.CastSpell(target, _damageSpellId, new CastSpellExtraArgs().SetTriggeringSpell(GetSpell()));
|
||||
caster.CastSpell(target, _damageSpellId, new CastSpellExtraArgs(TriggerCastFlags.IgnoreGCD | TriggerCastFlags.IgnoreSpellAndCategoryCD).SetTriggeringSpell(GetSpell()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user