aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/BattleGround.cpp33
-rw-r--r--src/game/BattleGround.h9
-rw-r--r--src/game/SpellEffects.cpp28
3 files changed, 14 insertions, 56 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 944e19bed1c..c90911f1b58 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -621,42 +621,29 @@ void BattleGround::RewardMark(Player *plr,uint32 count)
if(plr->GetDummyAura(SPELL_AURA_PLAYER_INACTIVE))
return;
- BattleGroundMarks mark;
- bool IsSpell;
+ if(!plr || !count)
+ return;
+
+ BattleGroundMarks mark;
switch(GetTypeID())
{
case BATTLEGROUND_AV:
- IsSpell = true;
- if(count == ITEM_WINNER_COUNT)
- mark = SPELL_AV_MARK_WINNER;
- else
- mark = SPELL_AV_MARK_LOSER;
+ mark = ITEM_AV_MARK_OF_HONOR;
break;
case BATTLEGROUND_WS:
- IsSpell = true;
- if(count == ITEM_WINNER_COUNT)
- mark = SPELL_WS_MARK_WINNER;
- else
- mark = SPELL_WS_MARK_LOSER;
+ mark = ITEM_WS_MARK_OF_HONOR;
break;
case BATTLEGROUND_AB:
- IsSpell = true;
- if(count == ITEM_WINNER_COUNT)
- mark = SPELL_AB_MARK_WINNER;
- else
- mark = SPELL_AB_MARK_LOSER;
+ mark = ITEM_AB_MARK_OF_HONOR;
break;
- case BATTLEGROUND_EY:
- IsSpell = false;
+ case BATTLEGROUND_EY:
mark = ITEM_EY_MARK_OF_HONOR;
break;
default:
return;
}
- if(IsSpell)
- plr->CastSpell(plr, mark, true);
- else if ( objmgr.GetItemPrototype( mark ) )
+ if ( objmgr.GetItemPrototype( mark ) )
{
ItemPosCountVec dest;
uint32 no_space_count = 0;
@@ -664,7 +651,7 @@ void BattleGround::RewardMark(Player *plr,uint32 count)
if( msg != EQUIP_ERR_OK ) // convert to possible store amount
count -= no_space_count;
- if( count != 0 && !dest.empty()) // can add some
+ if(!dest.empty()) // can add some
if(Item* item = plr->StoreNewItem( dest, mark, true, 0))
plr->SendNewItem(item,count,false,true);
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
index 41f7e37d235..411bbaf6211 100644
--- a/src/game/BattleGround.h
+++ b/src/game/BattleGround.h
@@ -50,12 +50,9 @@ 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_AV_MARK_OF_HONOR = 20560,
+ ITEM_WS_MARK_OF_HONOR = 20558,
+ ITEM_AB_MARK_OF_HONOR = 20559,
ITEM_EY_MARK_OF_HONOR = 29024
};
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 64b7811d462..a985e1c9fb1 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2627,33 +2627,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype)
// we succeeded in creating at least one item, so a levelup is possible
player->UpdateCraftSkill(m_spellInfo->Id);
- }
-
- // for battleground marks send by mail if not add all expected
- if(no_space > 0 )
- {
- BattleGroundTypeId bgType;
- 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;
- break;
- default:
- return;
- }
-
- if(BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(bgType))
- bg->SendRewardMarkByMail(player,newitemid,no_space);
- }
+ }
}
void Spell::EffectCreateItem(uint32 i)