Core/Spells: Delete ancient bg mark code from create item spell effect

This commit is contained in:
Shauren
2019-10-18 19:38:03 +02:00
parent c674a3a188
commit 38d04775db
2 changed files with 2 additions and 49 deletions

View File

@@ -93,23 +93,6 @@ enum BattlegroundQuests
SPELL_AB_QUEST_REWARD_5_BASES = 24064
};
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,
SPELL_SA_MARK_WINNER = 61160,
SPELL_SA_MARK_LOSER = 61159,
ITEM_AV_MARK_OF_HONOR = 20560,
ITEM_WS_MARK_OF_HONOR = 20558,
ITEM_AB_MARK_OF_HONOR = 20559,
ITEM_EY_MARK_OF_HONOR = 29024,
ITEM_SA_MARK_OF_HONOR = 42425
};
enum BattlegroundMarksCount
{
ITEM_WINNER_COUNT = 3,

View File

@@ -1332,26 +1332,6 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype, uint8 context /*= 0*/, s
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 = damage;
if (num_to_add < 1)
@@ -1428,7 +1408,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype, uint8 context /*= 0*/, s
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() > ITEM_QUALITY_EPIC || (pItem->GetQuality() == ITEM_QUALITY_EPIC && pItem->GetItemLevel(player) >= MinNewsItemLevel))
if (Guild* guild = player->GetGuild())
@@ -1436,18 +1416,8 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype, uint8 context /*= 0*/, s
// 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);
}
/*
// 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(SpellEffIndex effIndex)