diff options
| author | megamage <none@none> | 2009-08-12 20:36:55 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-08-12 20:36:55 -0500 |
| commit | d1a5689b6520d243487ce29335905a6e7b5f883d (patch) | |
| tree | ab4a0b80680ab5e4d9f676ef1c47f520d971a361 /src/game/SpellEffects.cpp | |
| parent | d575793f6d6cbc2e252d3f96f36f0ae21e63705c (diff) | |
[8344] In case battleground reward items player must "receive" instead "create" item in message. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
| -rw-r--r-- | src/game/SpellEffects.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 46ed5761b27..7105a3fafcb 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2716,6 +2716,26 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype) return; } + // bg reward have some special in code work + uint32 bgType = 0; + 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: + break; + } + uint32 num_to_add; // TODO: maybe all this can be replaced by using correct calculated `damage` value @@ -2798,11 +2818,21 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype) // send info to the client if(pItem) - player->SendNewItem(pItem, num_to_add, true, true); + player->SendNewItem(pItem, num_to_add, true, bgType == 0); // we succeeded in creating at least one item, so a levelup is possible - player->UpdateCraftSkill(m_spellInfo->Id); + if(bgType == 0) + player->UpdateCraftSkill(m_spellInfo->Id); + } + +/* + // for battleground marks send by mail if not add all expected + if(no_space > 0 && bgType) + { + if(BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(BattleGroundTypeId(bgType))) + bg->SendRewardMarkByMail(player, newitemid, no_space); } +*/ } void Spell::EffectCreateItem(uint32 i) |
