From c7c8c8ed014dbbd034ae20e7d73beca38d7a4adc Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 8 Apr 2010 03:29:13 +0400 Subject: [PATCH] Now BG honor marks not reawrded in BG * And related spells not create items. * Update code for allow creat marks for single existed case: outfield bg that not yet implemented in mangos. --- src/game/BattleGround.cpp | 1 - src/game/BattleGround.h | 16 +++++++++------- src/game/SpellEffects.cpp | 31 +++++++++++++------------------ 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 696b3604da9..879aa8adb1a 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -882,7 +882,6 @@ void BattleGround::RewardMark(Player *plr,uint32 count) break; case BATTLEGROUND_EY: IsSpell = false; - mark = ITEM_EY_MARK_OF_HONOR; break; default: return; diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 6b4ac03db60..3d5419a9e33 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -68,13 +68,15 @@ enum BattleGroundQuests enum BattleGroundMarks { - SPELL_WS_MARK_LOSER = 24950, - SPELL_WS_MARK_WINNER = 24951, - SPELL_AB_MARK_LOSER = 24952, - SPELL_AB_MARK_WINNER = 24953, - SPELL_AV_MARK_LOSER = 24954, - SPELL_AV_MARK_WINNER = 24955, - ITEM_EY_MARK_OF_HONOR = 29024 + SPELL_WS_MARK_LOSER = 24950, // not create marks now + SPELL_WS_MARK_WINNER = 24951, // not create marks now + SPELL_AB_MARK_LOSER = 24952, // not create marks now + SPELL_AB_MARK_WINNER = 24953, // not create marks now + SPELL_AV_MARK_LOSER = 24954, // not create marks now + SPELL_AV_MARK_WINNER = 24955, // not create marks now + + SPELL_WG_MARK_VICTORY = 24955, // honor + mark + SPELL_WG_MARK_DEFEAT = 58494, // honor + mark }; enum BattleGroundMarksCount diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9567a9bc5ef..b6c45597e47 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3172,20 +3172,12 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype) } // bg reward have some special in code work - uint32 bgType = 0; + bool bg_mark = false; switch(m_spellInfo->Id) { - case SPELL_AV_MARK_WINNER: - case SPELL_AV_MARK_LOSER: - bgType = BATTLEGROUND_AV; - break; - case SPELL_WS_MARK_WINNER: - case SPELL_WS_MARK_LOSER: - bgType = BATTLEGROUND_WS; - break; - case SPELL_AB_MARK_WINNER: - case SPELL_AB_MARK_LOSER: - bgType = BATTLEGROUND_AB; + case SPELL_WG_MARK_VICTORY: + case SPELL_WG_MARK_DEFEAT: + bg_mark = true; break; default: break; @@ -3275,19 +3267,22 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype) // send info to the client if(pItem) - player->SendNewItem(pItem, num_to_add, true, bgType == 0); + player->SendNewItem(pItem, num_to_add, true, !bg_mark); // we succeeded in creating at least one item, so a levelup is possible - if(bgType == 0) + if(!bg_mark) player->UpdateCraftSkill(m_spellInfo->Id); } // for battleground marks send by mail if not add all expected - if(no_space > 0 && bgType) + // FIXME: single existed bg marks for outfield bg and we not have it.. + /* + if(no_space > 0 && bg_mark) { if(BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(BattleGroundTypeId(bgType))) bg->SendRewardMarkByMail(player, newitemid, no_space); } + */ } void Spell::EffectCreateItem(SpellEffectIndex eff_idx) @@ -4579,7 +4574,7 @@ void Spell::EffectEnchantItemTmp(SpellEffectIndex eff_idx) uint32 duration; // rogue family enchantments exception by duration - if(m_spellInfo->Id == 38615) // Poison + if(m_spellInfo->Id == 38615) duration = 1800; // 30 mins // other rogue family enchantments always 1 hour (some have spell damage=0, but some have wrong data in EffBasePoints) else if(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE) @@ -4596,9 +4591,9 @@ void Spell::EffectEnchantItemTmp(SpellEffectIndex eff_idx) // shaman rockbiter enchantments else if(m_spellInfo->SpellVisual[0] == 0) duration = 1800; // 30 mins - else if(m_spellInfo->Id == 29702) // Greater Ward of Shielding + else if(m_spellInfo->Id == 29702) duration = 300; // 5 mins - else if(m_spellInfo->Id == 37360) // Consecrated Weapon + else if(m_spellInfo->Id == 37360) duration = 300; // 5 mins // default case else