aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-09 19:58:55 -0500
committermegamage <none@none>2009-05-09 19:58:55 -0500
commitdddc39c1abaf028531ffe218d48008e01bc3fe26 (patch)
tree62f08fc9b8021cbef224ee7702cac0833e63ee45
parenta7f663a748f862f15ace6f5468dfb0bac161b7e0 (diff)
*Fix a typo in canSeeSpellClickOn.
--HG-- branch : trunk
-rw-r--r--src/game/Player.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 23bfea068d8..bfd47aa8279 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1800,7 +1800,7 @@ void Player::AddToWorld()
///- The player should only be added when logging in
Unit::AddToWorld();
- for(int i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; i++)
+ for(int i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if(m_items[i])
m_items[i]->AddToWorld();
@@ -1817,7 +1817,7 @@ void Player::RemoveFromWorld()
StopCastingBindSight();
}
- for(int i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; i++)
+ for(int i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if(m_items[i])
m_items[i]->RemoveFromWorld();
@@ -20552,12 +20552,14 @@ void Player::ResummonPetTemporaryUnSummonedIfAny()
bool Player::canSeeSpellClickOn(Creature const *c) const
{
- SpellClickInfoMap const& map = objmgr.mSpellClickInfoMap;
- if(map.empty())
+ SpellClickInfoMap::const_iterator lower = objmgr.mSpellClickInfoMap.lower_bound(c->GetEntry());
+ SpellClickInfoMap::const_iterator upper = objmgr.mSpellClickInfoMap.upper_bound(c->GetEntry());
+ if(lower == upper)
return true;
- for(SpellClickInfoMap::const_iterator itr = map.lower_bound(c->GetEntry()); itr != map.upper_bound(c->GetEntry()); ++itr)
+ for(SpellClickInfoMap::const_iterator itr = lower; itr != upper; ++itr)
{
+ sLog.outError("%u %u %u %u", (uint32)itr->second.castFlags, itr->second.questId, itr->second.spellId);
if(itr->second.questId == 0 || GetQuestStatus(itr->second.questId) == QUEST_STATUS_INCOMPLETE)
return true;
}