Show
Ignore:
Timestamp:
11/19/08 13:32:28 (17 years ago)
Author:
yumileroy
Message:

[svn] Fixed a crash in OutdoorPvP*::BuffTeam?().

Original author: w12x
Date: 2008-10-20 13:34:00-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/OutdoorPvPHP.cpp

    r44 r80  
    318318        { 
    319319            if(Player * plr = objmgr.GetPlayer(*itr)) 
    320                 plr->CastSpell(plr,AllianceBuff,true); 
     320                if(plr->IsInWorld()) plr->CastSpell(plr,AllianceBuff,true); 
    321321        } 
    322322        for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr) 
    323323        { 
    324324            if(Player * plr = objmgr.GetPlayer(*itr)) 
    325                 plr->RemoveAurasDueToSpell(HordeBuff); 
     325                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(HordeBuff); 
    326326        } 
    327327    } 
     
    331331        { 
    332332            if(Player * plr = objmgr.GetPlayer(*itr)) 
    333                 plr->CastSpell(plr,HordeBuff,true); 
     333                if(plr->IsInWorld()) plr->CastSpell(plr,HordeBuff,true); 
    334334        } 
    335335        for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr) 
    336336        { 
    337337            if(Player * plr = objmgr.GetPlayer(*itr)) 
    338                 plr->RemoveAurasDueToSpell(AllianceBuff); 
     338                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(AllianceBuff); 
    339339        } 
    340340    } 
     
    344344        { 
    345345            if(Player * plr = objmgr.GetPlayer(*itr)) 
    346                 plr->RemoveAurasDueToSpell(AllianceBuff); 
     346                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(AllianceBuff); 
    347347        } 
    348348        for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr) 
    349349        { 
    350350            if(Player * plr = objmgr.GetPlayer(*itr)) 
    351                 plr->RemoveAurasDueToSpell(HordeBuff); 
     351                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(HordeBuff); 
    352352        } 
    353353    }