aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXanadu <none@none>2010-05-13 19:28:23 +0200
committerXanadu <none@none>2010-05-13 19:28:23 +0200
commit5bf4af15dc7d21c42e914fc773739884dc8d0b86 (patch)
treec6c06da1f504e644def83888c4208268d3a6afa0
parentc8e648e18e353bfbef37533f3148c7af620e94d4 (diff)
Prune some deadwood.
--HG-- branch : trunk
-rw-r--r--src/game/BattleGround.cpp135
-rw-r--r--src/game/BattleGround.h5
-rw-r--r--src/game/Player.h1
-rw-r--r--src/game/SpellEffects.cpp15
4 files changed, 0 insertions, 156 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 8ca49225597..bce5008788a 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -850,141 +850,6 @@ uint32 BattleGround::GetBattlemasterEntry() const
}
}
-/*
-void BattleGround::RewardMark(Player *plr,uint32 count)
-{
- BattleGroundMarks mark;
- switch(GetTypeID())
- {
- case BATTLEGROUND_AV:
- mark = ITEM_AV_MARK_OF_HONOR;
- break;
- case BATTLEGROUND_WS:
- mark = ITEM_WS_MARK_OF_HONOR;
- break;
- case BATTLEGROUND_AB:
- mark = ITEM_AB_MARK_OF_HONOR;
- break;
- case BATTLEGROUND_EY:
- mark = ITEM_EY_MARK_OF_HONOR;
- break;
- case BATTLEGROUND_SA:
- mark = ITEM_SA_MARK_OF_HONOR;
- break;
- default:
- return;
- }
-
- //if (IsSpell)
- // RewardSpellCast(plr,mark);
- //else
- RewardItem(plr,mark,count);
-}
-
-void BattleGround::RewardSpellCast(Player *plr, uint32 spell_id)
-{
- // 'Inactive' this aura prevents the player from gaining honor points and battleground tokens
- if (plr->HasAura(SPELL_AURA_PLAYER_INACTIVE))
- return;
-
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
- if (!spellInfo)
- {
- sLog.outError("Battleground reward casting spell %u not exist.",spell_id);
- return;
- }
-
- plr->CastSpell(plr, spellInfo, true);
-}
-
-void BattleGround::RewardItem(Player *plr, uint32 item_id, uint32 count)
-{
- // 'Inactive' this aura prevents the player from gaining honor points and battleground tokens
- if (plr->HasAura(SPELL_AURA_PLAYER_INACTIVE))
- return;
-
- ItemPosCountVec dest;
- uint32 no_space_count = 0;
- uint8 msg = plr->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item_id, count, &no_space_count);
-
- if (msg == EQUIP_ERR_ITEM_NOT_FOUND)
- {
- sLog.outErrorDb("Battleground reward item (Entry %u) not exist in `item_template`.",item_id);
- return;
- }
-
- if (msg != EQUIP_ERR_OK) // convert to possible store amount
- count -= no_space_count;
-
- if (count != 0 && !dest.empty()) // can add some
- if (Item* item = plr->StoreNewItem(dest, item_id, true, 0))
- plr->SendNewItem(item,count,true,false);
-
- if (no_space_count > 0)
- SendRewardMarkByMail(plr,item_id,no_space_count);
-}
-
-void BattleGround::SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count)
-{
- uint32 bmEntry = GetBattlemasterEntry();
- if (!bmEntry)
- return;
-
- ItemPrototype const* markProto = objmgr.GetItemPrototype(mark);
- if (!markProto)
- return;
-
- if (Item* markItem = Item::CreateItem(mark,count,plr))
- {
- // save new item before send
- markItem->SaveToDB(); // save for prevent lost at next mail load, if send fail then item will deleted
-
- // subject: item name
- std::string subject = markProto->Name1;
- int loc_idx = plr->GetSession()->GetSessionDbLocaleIndex();
- if (loc_idx >= 0)
- if (ItemLocale const *il = objmgr.GetItemLocale(markProto->ItemId))
- if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty())
- subject = il->Name[loc_idx];
-
- // text
- std::string textFormat = plr->GetSession()->GetTrinityString(LANG_BG_MARK_BY_MAIL);
- char textBuf[300];
- snprintf(textBuf, 300, textFormat.c_str(), GetName(), GetName());
-
- MailDraft(subject, textBuf)
- .AddItem(markItem)
- .SendMailTo(plr, MailSender(MAIL_CREATURE, bmEntry));
- }
-}
-
-void BattleGround::RewardQuestComplete(Player *plr)
-{
- uint32 quest;
- switch(GetTypeID())
- {
- case BATTLEGROUND_AV:
- quest = SPELL_AV_QUEST_REWARD;
- break;
- case BATTLEGROUND_WS:
- quest = SPELL_WS_QUEST_REWARD;
- break;
- case BATTLEGROUND_AB:
- quest = SPELL_AB_QUEST_REWARD;
- break;
- case BATTLEGROUND_EY:
- quest = SPELL_EY_QUEST_REWARD;
- break;
- case BATTLEGROUND_SA:
- quest = SPELL_SA_QUEST_REWARD;
- break;
- default:
- return;
- }
-
- RewardSpellCast(plr, quest);
-}
-*/
void BattleGround::BlockMovement(Player *plr)
{
plr->SetClientControl(plr, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
index 43b7f59fff2..80c605ca61f 100644
--- a/src/game/BattleGround.h
+++ b/src/game/BattleGround.h
@@ -448,11 +448,6 @@ class BattleGround
void CastSpellOnTeam(uint32 SpellID, uint32 TeamID);
void RewardHonorToTeam(uint32 Honor, uint32 TeamID);
void RewardReputationToTeam(uint32 faction_id, uint32 Reputation, uint32 TeamID);
- /*void RewardMark(Player *plr,uint32 count);
- void SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count);
- void RewardItem(Player *plr, uint32 item_id, uint32 count);
- void RewardQuestComplete(Player *plr);
- void RewardSpellCast(Player *plr, uint32 spell_id);*/
void UpdateWorldState(uint32 Field, uint32 Value);
void UpdateWorldStateForPlayer(uint32 Field, uint32 Value, Player *Source);
void EndBattleGround(uint32 winner);
diff --git a/src/game/Player.h b/src/game/Player.h
index 4d1058fc43d..b1ab6a683aa 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1667,7 +1667,6 @@ class Player : public Unit, public GridObject<Player>
ActionButton* addActionButton(uint8 button, uint32 action, uint8 type);
void removeActionButton(uint8 button);
- uint32 GetActionButtonSpell(uint8 button) const;
ActionButton const* GetActionButton(uint8 button);
void SendInitialActionButtons() const { SendActionButtons(1); }
void SendActionButtons(uint32 state) const;
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 5d5dae2e3b9..5b42998ddfe 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1790,21 +1790,6 @@ void Spell::EffectDummy(uint32 i)
case SPELLFAMILY_HUNTER:
switch(m_spellInfo->Id)
{
- case 781: // Disengage
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- WorldPacket data(SMSG_MOVE_KNOCK_BACK, 50);
- data.append(m_caster->GetPackGUID());
- data << getMSTime();
- data << float(cosf(m_caster->GetOrientation()+M_PI));
- data << float(sinf(m_caster->GetOrientation()+M_PI));
- data << float(15);
- data << float(-7.0f);
- m_caster->ToPlayer()->GetSession()->SendPacket(&data);
- return;
- }
case 23989: // Readiness talent
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)