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/OutdoorPvPSI.cpp

    r44 r80  
    7171        { 
    7272            if(Player * plr = objmgr.GetPlayer(*itr)) 
    73                 plr->CastSpell(plr,SI_CENARION_FAVOR,true); 
     73                if(plr->IsInWorld()) plr->CastSpell(plr,SI_CENARION_FAVOR,true); 
    7474        } 
    7575        for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr) 
    7676        { 
    7777            if(Player * plr = objmgr.GetPlayer(*itr)) 
    78                 plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
     78                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
    7979        } 
    8080    } 
     
    8484        { 
    8585            if(Player * plr = objmgr.GetPlayer(*itr)) 
    86                 plr->CastSpell(plr,SI_CENARION_FAVOR,true); 
     86                if(plr->IsInWorld()) plr->CastSpell(plr,SI_CENARION_FAVOR,true); 
    8787        } 
    8888        for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr) 
    8989        { 
    9090            if(Player * plr = objmgr.GetPlayer(*itr)) 
    91                 plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
     91                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
    9292        } 
    9393    } 
     
    9797        { 
    9898            if(Player * plr = objmgr.GetPlayer(*itr)) 
    99                 plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
     99                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
    100100        } 
    101101        for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr) 
    102102        { 
    103103            if(Player * plr = objmgr.GetPlayer(*itr)) 
    104                 plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
     104                if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR); 
    105105        } 
    106106    }