BFA Update (still lots of testing to do tho)

This commit is contained in:
hondacrx
2018-12-10 12:46:25 -05:00
parent 468b053946
commit 8e20114e10
256 changed files with 35613 additions and 10459 deletions
@@ -96,6 +96,9 @@ namespace Game
features.BpayStoreDisabledByParentalControls = false;
features.CharUndeleteEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemCharacterUndeleteEnabled);
features.BpayStoreEnabled = WorldConfig.GetBoolValue(WorldCfg.FeatureSystemBpayStoreEnabled);
features.MaxCharactersPerRealm = WorldConfig.GetIntValue(WorldCfg.CharactersPerRealm);
features.MinimumExpansionLevel = (int)Expansion.Classic;
features.MaximumExpansionLevel = WorldConfig.GetIntValue(WorldCfg.Expansion);
SendPacket(features);
}
+1 -1
View File
@@ -82,7 +82,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.BattlePetSummon, Processing = PacketProcessing.Inplace)]
void HandleBattlePetSummon(BattlePetSummon battlePetSummon)
{
if (_player.GetGuidValue(PlayerFields.SummonedBattlePetId) != battlePetSummon.PetGuid)
if (_player.GetGuidValue(ActivePlayerFields.SummonedBattlePetId) != battlePetSummon.PetGuid)
GetBattlePetMgr().SummonPet(battlePetSummon.PetGuid);
else
GetBattlePetMgr().DismissPet();
+4 -5
View File
@@ -60,8 +60,7 @@ namespace Game
CalendarSendCalendarEventInfo eventInfo;
eventInfo.EventID = calendarEvent.EventId;
eventInfo.Date = calendarEvent.Date;
Guild guild = Global.GuildMgr.GetGuildById(calendarEvent.GuildId);
eventInfo.EventGuildID = guild ? guild.GetGUID() : ObjectGuid.Empty;
eventInfo.EventClubID = calendarEvent.GuildId;
eventInfo.EventName = calendarEvent.Title;
eventInfo.EventType = calendarEvent.EventType;
eventInfo.Flags = calendarEvent.Flags;
@@ -107,12 +106,12 @@ namespace Game
Global.CalendarMgr.SendCalendarCommandResult(GetPlayer().GetGUID(), CalendarError.EventInvalid);
}
[WorldPacketHandler(ClientOpcodes.CalendarGuildFilter)]
void HandleCalendarGuildFilter(CalendarGuildFilter calendarGuildFilter)
[WorldPacketHandler(ClientOpcodes.CalendarCommunityFilter)]
void HandleCalendarCommunityFilter(CalendarCommunityFilter calendarCommunityFilter)
{
Guild guild = Global.GuildMgr.GetGuildById(GetPlayer().GetGuildId());
if (guild)
guild.MassInviteToEvent(this, calendarGuildFilter.MinLevel, calendarGuildFilter.MaxLevel, calendarGuildFilter.MaxRankOrder);
guild.MassInviteToEvent(this, calendarCommunityFilter.MinLevel, calendarCommunityFilter.MaxLevel, calendarCommunityFilter.MaxRankOrder);
}
[WorldPacketHandler(ClientOpcodes.CalendarAddEvent)]
-8
View File
@@ -120,12 +120,10 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.ChatChannelInvite)]
[WorldPacketHandler(ClientOpcodes.ChatChannelKick)]
[WorldPacketHandler(ClientOpcodes.ChatChannelModerator)]
[WorldPacketHandler(ClientOpcodes.ChatChannelMute)]
[WorldPacketHandler(ClientOpcodes.ChatChannelSetOwner)]
[WorldPacketHandler(ClientOpcodes.ChatChannelSilenceAll)]
[WorldPacketHandler(ClientOpcodes.ChatChannelUnban)]
[WorldPacketHandler(ClientOpcodes.ChatChannelUnmoderator)]
[WorldPacketHandler(ClientOpcodes.ChatChannelUnmute)]
[WorldPacketHandler(ClientOpcodes.ChatChannelUnsilenceAll)]
void HandleChannelPlayerCommand(ChannelPlayerCommand packet)
{
@@ -156,9 +154,6 @@ namespace Game
case ClientOpcodes.ChatChannelModerator:
channel.SetModerator(GetPlayer(), packet.Name);
break;
case ClientOpcodes.ChatChannelMute:
channel.SetMute(GetPlayer(), packet.Name);
break;
case ClientOpcodes.ChatChannelSetOwner:
channel.SetOwner(GetPlayer(), packet.Name);
break;
@@ -171,9 +166,6 @@ namespace Game
case ClientOpcodes.ChatChannelUnmoderator:
channel.UnsetModerator(GetPlayer(), packet.Name);
break;
case ClientOpcodes.ChatChannelUnmute:
channel.UnsetMute(GetPlayer(), packet.Name);
break;
case ClientOpcodes.ChatChannelUnsilenceAll:
channel.UnsilenceAll(GetPlayer(), packet.Name);
break;
+10 -18
View File
@@ -115,6 +115,7 @@ namespace Game
while (result.NextRow());
}
charResult.IsTestDemonHunterCreationAllowed = canAlwaysCreateDemonHunter;
charResult.IsDemonHunterCreationAllowed = GetAccountExpansion() >= Expansion.Legion || canAlwaysCreateDemonHunter;
charResult.IsAlliedRacesCreationAllowed = GetAccountExpansion() >= Expansion.BattleForAzeroth;
@@ -254,8 +255,8 @@ namespace Game
if (!HasPermission(RBACPermissions.SkipCheckCharacterCreationRacemask))
{
int raceMaskDisabled = WorldConfig.GetIntValue(WorldCfg.CharacterCreatingDisabledRacemask);
if (Convert.ToBoolean((1 << ((int)charCreate.CreateInfo.RaceId - 1)) & raceMaskDisabled))
ulong raceMaskDisabled = WorldConfig.GetUInt64Value(WorldCfg.CharacterCreatingDisabledRacemask);
if (Convert.ToBoolean((1ul << ((int)charCreate.CreateInfo.RaceId - 1)) & raceMaskDisabled))
{
SendCharCreate(ResponseCodes.CharCreateDisabled);
return;
@@ -472,7 +473,7 @@ namespace Game
DB.Login.CommitTransaction(trans);
// Success
SendCharCreate(ResponseCodes.CharCreateSuccess);
SendCharCreate(ResponseCodes.CharCreateSuccess, newChar.GetGUID());
Log.outInfo(LogFilter.Player, "Account: {0} (IP: {1}) Create Character: {2} {3}", GetAccountId(), GetRemoteAddress(), createInfo.Name, newChar.GetGUID().ToString());
Global.ScriptMgr.OnPlayerCreate(newChar);
@@ -691,16 +692,6 @@ namespace Game
// TODO: Move this to BattlePetMgr::SendJournalLock() just to have all packets in one file
SendPacket(new BattlePetJournalLockAcquired());
ArtifactKnowledge artifactKnowledge = new ArtifactKnowledge();
artifactKnowledge.ArtifactCategoryID = ArtifactCategory.Primary;
artifactKnowledge.KnowledgeLevel = (sbyte)WorldConfig.GetIntValue(WorldCfg.CurrencyStartArtifactKnowledge);
SendPacket(artifactKnowledge);
ArtifactKnowledge artifactKnowledgeFishingPole = new ArtifactKnowledge();
artifactKnowledgeFishingPole.ArtifactCategoryID = ArtifactCategory.Fishing;
artifactKnowledgeFishingPole.KnowledgeLevel = 0;
SendPacket(artifactKnowledgeFishingPole);
pCurrChar.SendInitialPacketsBeforeAddToMap();
//Show cinematic at the first time that player login
@@ -954,7 +945,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.SetWatchedFaction)]
void HandleSetWatchedFaction(SetWatchedFaction packet)
{
GetPlayer().SetInt32Value(PlayerFields.WatchedFactionIndex, (int)packet.FactionIndex);
GetPlayer().SetInt32Value(ActivePlayerFields.WatchedFactionIndex, (int)packet.FactionIndex);
}
[WorldPacketHandler(ClientOpcodes.SetFactionInactive)]
@@ -1531,8 +1522,8 @@ namespace Game
if (!HasPermission(RBACPermissions.SkipCheckCharacterCreationRacemask))
{
uint raceMaskDisabled = WorldConfig.GetUIntValue(WorldCfg.CharacterCreatingDisabledRacemask);
if (Convert.ToBoolean(1 << ((int)factionChangeInfo.RaceID - 1) & raceMaskDisabled))
ulong raceMaskDisabled = WorldConfig.GetUInt64Value(WorldCfg.CharacterCreatingDisabledRacemask);
if (Convert.ToBoolean(1ul << ((int)factionChangeInfo.RaceID - 1) & raceMaskDisabled))
{
SendCharFactionChange(ResponseCodes.CharCreateError, factionChangeInfo);
return;
@@ -2018,7 +2009,7 @@ namespace Game
void HandleOpeningCinematic(OpeningCinematic packet)
{
// Only players that has not yet gained any experience can use this
if (GetPlayer().GetUInt32Value(PlayerFields.Xp) != 0)
if (GetPlayer().GetUInt32Value(ActivePlayerFields.Xp) != 0)
return;
ChrClassesRecord classEntry = CliDB.ChrClassesStorage.LookupByKey(GetPlayer().GetClass());
@@ -2287,10 +2278,11 @@ namespace Game
GetPlayer().SetStandState(packet.StandState);
}
void SendCharCreate(ResponseCodes result)
void SendCharCreate(ResponseCodes result, ObjectGuid guid = default(ObjectGuid))
{
CreateChar response = new CreateChar();
response.Code = result;
response.Guid = guid;
SendPacket(response);
}
+9 -42
View File
@@ -330,7 +330,7 @@ namespace Game
case ChatMsg.RaidWarning:
{
Group group = GetPlayer().GetGroup();
if (!group || !group.isRaidGroup() || !(group.IsLeader(GetPlayer().GetGUID()) || group.IsAssistant(GetPlayer().GetGUID())) || group.isBGGroup())
if (!group || !(group.isRaidGroup() || WorldConfig.GetBoolValue(WorldCfg.ChatPartyRaidWarnings)) || !(group.IsLeader(GetPlayer().GetGUID()) || group.IsAssistant(GetPlayer().GetGUID())) || group.isBGGroup())
return;
Global.ScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
@@ -379,50 +379,17 @@ namespace Game
}
}
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageGuild)]
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageOfficer)]
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageParty)]
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageRaid)]
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageInstanceChat)]
void HandleChatAddonMessage(ChatAddonMessage packet)
[WorldPacketHandler(ClientOpcodes.ChatAddonMessage)]
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageTargeted)]
void HandleChatAddonMessage(ChatAddonMessage chatAddonMessage)
{
ChatMsg type;
switch (packet.GetOpcode())
{
case ClientOpcodes.ChatAddonMessageGuild:
type = ChatMsg.Guild;
break;
case ClientOpcodes.ChatAddonMessageOfficer:
type = ChatMsg.Officer;
break;
case ClientOpcodes.ChatAddonMessageParty:
type = ChatMsg.Party;
break;
case ClientOpcodes.ChatAddonMessageRaid:
type = ChatMsg.Raid;
break;
case ClientOpcodes.ChatAddonMessageInstanceChat:
type = ChatMsg.InstanceChat;
break;
default:
Log.outError(LogFilter.Network, "HandleChatAddonMessage: Unknown addon chat opcode ({0})", packet.GetOpcode());
return;
}
HandleChatAddon(type, packet.Prefix, packet.Text);
HandleChatAddon(chatAddonMessage.Params.Type, chatAddonMessage.Params.Prefix, chatAddonMessage.Params.Text);
}
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageWhisper)]
void HandleChatAddonMessageWhisper(ChatAddonMessageWhisper packet)
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageTargeted)]
void HandleChatAddonMessageTargeted(ChatAddonMessageTargeted chatAddonMessageTargeted)
{
HandleChatAddon(ChatMsg.Whisper, packet.Prefix, packet.Text, packet.Target);
}
[WorldPacketHandler(ClientOpcodes.ChatAddonMessageChannel)]
void HandleChatAddonMessageChannel(ChatAddonMessageChannel chatAddonMessageChannel)
{
HandleChatAddon(ChatMsg.Channel, chatAddonMessageChannel.Prefix, chatAddonMessageChannel.Text, chatAddonMessageChannel.Target);
HandleChatAddon(chatAddonMessageTargeted.Params.Type, chatAddonMessageTargeted.Params.Prefix, chatAddonMessageTargeted.Params.Text, chatAddonMessageTargeted.Target);
}
void HandleChatAddon(ChatMsg type, string prefix, string text, string target = "")
@@ -595,7 +562,7 @@ namespace Game
if (em == null)
return;
uint emote_anim = em.EmoteID;
uint emote_anim = em.EmoteId;
switch ((Emote)emote_anim)
{
+1 -1
View File
@@ -49,7 +49,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.DuelResponse)]
void HandleDuelResponse(DuelResponse duelResponse)
{
if (duelResponse.Accepted)
if (duelResponse.Accepted && !duelResponse.Forfeited)
HandleDuelAccepted();
else
HandleDuelCancelled();
+3 -3
View File
@@ -287,7 +287,7 @@ namespace Game
}
}
[WorldPacketHandler(ClientOpcodes.GuildBankSwapItems)]
//[WorldPacketHandler(ClientOpcodes.GuildBankSwapItems)]
void HandleGuildBankSwapItems(GuildBankSwapItems packet)
{
if (!GetPlayer().GetGameObjectIfCanInteractWith(packet.Banker, GameObjectTypes.GuildBank))
@@ -370,9 +370,9 @@ namespace Game
Guild.GuildBankRightsAndSlots[] rightsAndSlots = new Guild.GuildBankRightsAndSlots[GuildConst.MaxBankTabs];
for (byte tabId = 0; tabId < GuildConst.MaxBankTabs; ++tabId)
rightsAndSlots[tabId] = new Guild.GuildBankRightsAndSlots(tabId, (sbyte)packet.TabFlags[tabId], packet.TabWithdrawItemLimit[tabId]);
rightsAndSlots[tabId] = new Guild.GuildBankRightsAndSlots(tabId, (sbyte)packet.TabFlags[tabId], (int)packet.TabWithdrawItemLimit[tabId]);
guild.HandleSetRankInfo(this, (byte)packet.RankOrder, packet.RankName, (GuildRankRights)packet.Flags, (uint)packet.WithdrawGoldLimit, rightsAndSlots);
guild.HandleSetRankInfo(this, (byte)packet.RankOrder, packet.RankName, (GuildRankRights)packet.Flags, packet.WithdrawGoldLimit, rightsAndSlots);
}
[WorldPacketHandler(ClientOpcodes.RequestGuildPartyState)]
+10 -1
View File
@@ -78,11 +78,20 @@ namespace Game
HotfixResponse.HotfixData hotfixData = new HotfixResponse.HotfixData();
hotfixData.ID = hotfixId;
hotfixData.RecordID = hotfix;
if (storage.HasRecord((uint)hotfixData.RecordID))
if (storage != null && storage.HasRecord((uint)hotfixData.RecordID))
{
hotfixData.Data.HasValue = true;
storage.WriteRecord((uint)hotfixData.RecordID, GetSessionDbcLocale(), hotfixData.Data.Value);
}
else
{
byte[] blobData = Global.DB2Mgr.GetHotfixBlobData(MathFunctions.Pair64_HiPart(hotfixId), hotfix);
if (blobData != null)
{
hotfixData.Data.HasValue = true;
hotfixData.Data.Value.WriteBytes(blobData);
}
}
hotfixQueryResponse.Hotfixes.Add(hotfixData);
}
+3 -3
View File
@@ -100,9 +100,9 @@ namespace Game
InspectHonorStats honorStats = new InspectHonorStats();
honorStats.PlayerGUID = request.TargetGUID;
honorStats.LifetimeHK = player.GetUInt32Value(PlayerFields.LifetimeHonorableKills);
honorStats.YesterdayHK = player.GetUInt16Value(PlayerFields.Kills, 1);
honorStats.TodayHK = player.GetUInt16Value(PlayerFields.Kills, 0);
honorStats.LifetimeHK = player.GetUInt32Value(ActivePlayerFields.LifetimeHonorableKills);
honorStats.YesterdayHK = player.GetUInt16Value(ActivePlayerFields.Kills, 1);
honorStats.TodayHK = player.GetUInt16Value(ActivePlayerFields.Kills, 0);
honorStats.LifetimeMaxRank = 0; // @todo
SendPacket(honorStats);
+1 -1
View File
@@ -507,7 +507,7 @@ namespace Game
Item pItem = _player.GetItemFromBuyBackSlot(packet.Slot);
if (pItem != null)
{
uint price = _player.GetUInt32Value(PlayerFields.BuyBackPrice1 + (int)(packet.Slot - InventorySlots.BuyBackStart));
uint price = _player.GetUInt32Value(ActivePlayerFields.BuyBackPrice + (int)(packet.Slot - InventorySlots.BuyBackStart));
if (!_player.HasEnoughMoney(price))
{
_player.SendBuyError(BuyResult.NotEnoughtMoney, creature, pItem.GetEntry());
+3 -10
View File
@@ -130,7 +130,7 @@ namespace Game
return;
}
GetPlayer().SetByteValue(PlayerFields.FieldBytes, PlayerFieldOffsets.FieldBytesOffsetActionBarToggles, packet.Mask);
GetPlayer().SetByteValue(ActivePlayerFields.Bytes, PlayerFieldOffsets.FieldBytesOffsetActionBarToggles, packet.Mask);
}
[WorldPacketHandler(ClientOpcodes.CompleteCinematic)]
@@ -425,13 +425,6 @@ namespace Game
_collectionMgr.MountSetFavorite(mountSetFavorite.MountSpellID, mountSetFavorite.IsFavorite);
}
[WorldPacketHandler(ClientOpcodes.PvpPrestigeRankUp)]
void HandlePvpPrestigeRankUp(PvpPrestigeRankUp pvpPrestigeRankUp)
{
if (_player.CanPrestige())
_player.Prestige();
}
[WorldPacketHandler(ClientOpcodes.CloseInteraction)]
void HandleCloseInteraction(CloseInteraction closeInteraction)
{
@@ -505,12 +498,12 @@ namespace Game
{
if (farSight.Enable)
{
Log.outDebug(LogFilter.Network, "Added FarSight {0} to player {1}", GetPlayer().GetUInt64Value(PlayerFields.Farsight), GetPlayer().GetGUID().ToString());
Log.outDebug(LogFilter.Network, "Added FarSight {0} to player {1}", GetPlayer().GetUInt64Value(ActivePlayerFields.Farsight), GetPlayer().GetGUID().ToString());
WorldObject target = GetPlayer().GetViewpoint();
if (target)
GetPlayer().SetSeer(target);
else
Log.outDebug(LogFilter.Network, "Player {0} (GUID: {1}) requests non-existing seer {2}", GetPlayer().GetName(), GetPlayer().GetGUID().ToString(), GetPlayer().GetUInt64Value(PlayerFields.Farsight));
Log.outDebug(LogFilter.Network, "Player {0} (GUID: {1}) requests non-existing seer {2}", GetPlayer().GetName(), GetPlayer().GetGUID().ToString(), GetPlayer().GetUInt64Value(ActivePlayerFields.Farsight));
}
else
{
+6
View File
@@ -201,6 +201,12 @@ namespace Game
}
else
plrMover.RemoveFlag(PlayerFields.Flags, PlayerFlags.IsOutOfBounds);
if (opcode == ClientOpcodes.MoveJump)
{
plrMover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Jump, 605); // Mind Control
plrMover.ProcSkillsAndAuras(null, ProcFlags.Jump, ProcFlags.None, ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
}
}
}
+3 -5
View File
@@ -582,13 +582,11 @@ namespace Game
if (!GetPlayer().IsInWorld)
return;
// pet/charmed
Creature pet = ObjectAccessor.GetCreatureOrPetOrVehicle(GetPlayer(), packet.Pet);
if (pet)
if (pet && pet.ToPet() && pet.ToPet().getPetType() == PetType.Hunter)
{
if (pet.IsPet())
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.AsDeleted);
else if (pet.GetGUID() == GetPlayer().GetCharmGUID())
GetPlayer().StopCastingCharm();
_player.RemovePet((Pet)pet, PetSaveMode.AsDeleted);
}
}
+9 -7
View File
@@ -23,6 +23,7 @@ using Game.Maps;
using Game.Misc;
using Game.Network;
using Game.Network.Packets;
using System;
using System.Collections.Generic;
namespace Game
@@ -143,10 +144,11 @@ namespace Game
for (uint i = 0; i < SharedConst.MaxCreatureKillCredit; ++i)
stats.ProxyCreatureID[i] = creatureInfo.KillCredit[i];
stats.CreatureDisplayID[0] = creatureInfo.ModelId1;
stats.CreatureDisplayID[1] = creatureInfo.ModelId2;
stats.CreatureDisplayID[2] = creatureInfo.ModelId3;
stats.CreatureDisplayID[3] = creatureInfo.ModelId4;
foreach (var model in creatureInfo.Models)
{
stats.Display.TotalProbability += model.Probability;
stats.Display.CreatureDisplay.Add(new CreatureXDisplay(model.CreatureDisplayID, model.DisplayScale, model.Probability));
}
stats.HpMulti = creatureInfo.ModHealth;
stats.EnergyMulti = creatureInfo.ModMana;
@@ -155,6 +157,7 @@ namespace Game
stats.RequiredExpansion = creatureInfo.RequiredExpansion;
stats.HealthScalingExpansion = creatureInfo.HealthScalingExpansion;
stats.VignetteID = creatureInfo.VignetteID;
stats.Class = (int)creatureInfo.UnitClass;
stats.Title = creatureInfo.SubName;
stats.TitleAlt = creatureInfo.TitleAlt;
@@ -389,13 +392,12 @@ namespace Game
questPOIBlobData.QuestObjectiveID = data.QuestObjectiveID;
questPOIBlobData.QuestObjectID = data.QuestObjectID;
questPOIBlobData.MapID = data.MapID;
questPOIBlobData.WorldMapAreaID = data.WorldMapAreaID;
questPOIBlobData.Floor = data.Floor;
questPOIBlobData.UiMapID = data.UiMapID;
questPOIBlobData.Priority = data.Priority;
questPOIBlobData.Flags = data.Flags;
questPOIBlobData.WorldEffectID = data.WorldEffectID;
questPOIBlobData.PlayerConditionID = data.PlayerConditionID;
questPOIBlobData.UnkWoD1 = data.UnkWoD1;
questPOIBlobData.SpawnTrackingID = data.SpawnTrackingID;
questPOIBlobData.AlwaysAllowMergingBlobs = data.AlwaysAllowMergingBlobs;
foreach (var point in data.points)
+4 -4
View File
@@ -53,19 +53,19 @@ namespace Game
}
[WorldPacketHandler(ClientOpcodes.LearnPvpTalents)]
void HandleLearnPvpTalentsOpcode(LearnPvpTalents packet)
void HandleLearnPvpTalents(LearnPvpTalents packet)
{
LearnPvpTalentsFailed learnPvpTalentsFailed = new LearnPvpTalentsFailed();
bool anythingLearned = false;
foreach (ushort talentId in packet.Talents)
foreach (var pvpTalent in packet.Talents)
{
TalentLearnResult result = _player.LearnPvpTalent(talentId, ref learnPvpTalentsFailed.SpellID);
TalentLearnResult result = _player.LearnPvpTalent(pvpTalent.PvPTalentID, pvpTalent.Slot, ref learnPvpTalentsFailed.SpellID);
if (result != 0)
{
if (learnPvpTalentsFailed.Reason == 0)
learnPvpTalentsFailed.Reason = (uint)result;
learnPvpTalentsFailed.Talents.Add(talentId);
learnPvpTalentsFailed.Talents.Add(pvpTalent);
}
else
anythingLearned = true;
+2 -2
View File
@@ -450,7 +450,7 @@ namespace Game
if (_player.HasAuraType(AuraType.PreventResurrection))
return; // silent return, client should display error by itself and not send this opcode
var selfResSpells = _player.GetDynamicValues(PlayerDynamicFields.SelfResSpells);
var selfResSpells = _player.GetDynamicValues(ActivePlayerDynamicFields.SelfResSpells);
if (!selfResSpells.Contains(selfRes.SpellId))
return;
@@ -458,7 +458,7 @@ namespace Game
if (spellInfo != null)
_player.CastSpell(_player, spellInfo, false, null);
_player.RemoveDynamicValue(PlayerDynamicFields.SelfResSpells, selfRes.SpellId);
_player.RemoveDynamicValue(ActivePlayerDynamicFields.SelfResSpells, selfRes.SpellId);
}
[WorldPacketHandler(ClientOpcodes.SpellClick)]
+10
View File
@@ -108,6 +108,15 @@ namespace Game
GetPlayer().m_taxi.AppendTaximaskTo(data, lastTaxiCheaterState);
byte[] reachableNodes = new byte[PlayerConst.TaxiMaskSize];
Global.TaxiPathGraph.GetReachableNodesMask(CliDB.TaxiNodesStorage.LookupByKey(curloc), reachableNodes);
for (var i = 0; i < PlayerConst.TaxiMaskSize; ++i)
{
data.CanLandNodes[i] &= reachableNodes[i];
data.CanUseNodes[i] &= reachableNodes[i];
}
SendPacket(data);
GetPlayer().SetTaxiCheater(lastTaxiCheaterState);
@@ -164,6 +173,7 @@ namespace Game
if (unit == null)
{
Log.outDebug(LogFilter.Network, "WORLD: HandleActivateTaxiOpcode - {0} not found or you can't interact with it.", activateTaxi.Vendor.ToString());
SendActivateTaxiReply(ActivateTaxiReply.TooFarAway);
return;
}