From c4ecfc9f02da2179f237cc92270142464c0ec49b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 24 Oct 2019 16:36:02 -0400 Subject: [PATCH] Core/Spells: Delete ancient bg mark code from create item spell effect Port From (https://github.com/TrinityCore/TrinityCore/commit/38d04775dbd960d8e6fbfcd1d605be30cb425f08) --- .../Framework/Constants/BattleGroundsConst.cs | 17 ------------- Source/Game/Spells/SpellEffects.cs | 25 ++----------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Source/Framework/Constants/BattleGroundsConst.cs b/Source/Framework/Constants/BattleGroundsConst.cs index dfa59ca3c..62badbfa2 100644 --- a/Source/Framework/Constants/BattleGroundsConst.cs +++ b/Source/Framework/Constants/BattleGroundsConst.cs @@ -198,23 +198,6 @@ namespace Framework.Constants Neutral = 2 // Battleground: Neutral, Arena: None } - public enum BattlegroundMarks - { - SpellWsMarkLoser = 24950, - SpellWsMarkWinner = 24951, - SpellAbMarkLoser = 24952, - SpellAbMarkWinner = 24953, - SpellAvMarkLoser = 24954, - SpellAvMarkWinner = 24955, - SpellSaMarkWinner = 61160, - SpellSaMarkLoser = 61159, - ItemAvMarkOfHonor = 20560, - ItemWsMarkOfHonor = 20558, - ItemAbMarkOfHonor = 20559, - ItemEyMarkOfHonor = 29024, - ItemSaMarkOfHonor = 42425 - } - public enum BattlegroundMarksCount { WinnterCount = 3, diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index e927e288f..1a13e9611 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -1057,26 +1057,6 @@ namespace Game.Spells return; } - // bg reward have some special in code work - BattlegroundTypeId bgType = 0; - switch ((BattlegroundMarks)m_spellInfo.Id) - { - case BattlegroundMarks.SpellAvMarkWinner: - case BattlegroundMarks.SpellAvMarkLoser: - bgType = BattlegroundTypeId.AV; - break; - case BattlegroundMarks.SpellWsMarkWinner: - case BattlegroundMarks.SpellWsMarkLoser: - bgType = BattlegroundTypeId.WS; - break; - case BattlegroundMarks.SpellAbMarkWinner: - case BattlegroundMarks.SpellAbMarkLoser: - bgType = BattlegroundTypeId.AB; - break; - default: - break; - } - uint num_to_add = (uint)damage; if (num_to_add < 1) @@ -1146,7 +1126,7 @@ namespace Game.Spells pItem.SetCreator(player.GetGUID()); // send info to the client - player.SendNewItem(pItem, num_to_add, true, bgType == 0); + player.SendNewItem(pItem, num_to_add, true, true); if (pItem.GetQuality() > ItemQuality.Epic || (pItem.GetQuality() == ItemQuality.Epic && pItem.GetItemLevel(player) >= GuildConst.MinNewsItemLevel)) { @@ -1156,8 +1136,7 @@ namespace Game.Spells } // we succeeded in creating at least one item, so a levelup is possible - if (bgType == 0) - player.UpdateCraftSkill(m_spellInfo.Id); + player.UpdateCraftSkill(m_spellInfo.Id); } }