Skip to content

Commit

Permalink
Now BG honor marks not reawrded in BG
Browse files Browse the repository at this point in the history
* And related spells not create items.
* Update code for allow creat marks for single existed case: outfield bg
  that not yet implemented in mangos.
  • Loading branch information
VladimirMangos committed Apr 7, 2010
1 parent 18bc24d commit c7c8c8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
1 change: 0 additions & 1 deletion src/game/BattleGround.cpp
Expand Up @@ -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;
Expand Down
16 changes: 9 additions & 7 deletions src/game/BattleGround.h
Expand Up @@ -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
Expand Down
31 changes: 13 additions & 18 deletions src/game/SpellEffects.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

4 comments on commit c7c8c8e

@Stabatha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AV spells do not create marks either

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is correct. Do you read 3.3.3 client changes?
Do you read commit notes?

@Stabatha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I know that... I thought you were trying to make it like it still did in 3.2, since I saw.. player->SendNewItem(pItem, num_to_add, true, !bg_mark);

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code just saved for future use with still existed marks for in zone outdoor bg that not implemented yet

Please sign in to comment.