Changeset 128

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

[svn] * Prevent crash at access to deleted social data for player. Remove social data at logout instead - source mangos
* Fixed subcommands list output at console. - source mangos
* Rename scripts update.

Original author: KingPin?
Date: 2008-10-28 08:10:44-05:00

Location:
trunk
Files:
1 added
1 removed
4 modified

Legend:

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

    r112 r128  
    796796            continue; 
    797797 
    798         (list += "\n    ") += table[i].Name; 
     798        if(m_session) 
     799            list += "\n    "; 
     800        else 
     801            list += "\n\r    "; 
     802 
     803        list += table[i].Name; 
     804 
    799805                if(table[i].ChildCommands) 
    800806                        list += " ..."; 
  • trunk/src/game/Player.cpp

    r120 r128  
    434434    CleanupsBeforeDelete(); 
    435435 
    436     if(m_uint32Values)                                      // only for fully created Object 
    437     { 
    438         sSocialMgr.RemovePlayerSocial(GetGUIDLow()); 
    439     } 
     436    //m_social = NULL; 
    440437 
    441438    // Note: buy back item already deleted from DB when player was saved 
  • trunk/src/game/SpellEffects.cpp

    r126 r128  
    48994899 
    49004900    // caster or target already have requested duel 
    4901     if( caster->duel || target->duel || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) ) 
     4901    if( caster->duel || target->duel || !target->GetSocial() || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) ) 
    49024902        return; 
    49034903 
  • trunk/src/game/WorldSession.cpp

    r112 r128  
    386386        _player->CleanupsBeforeDelete();                    // do some cleanup before deleting to prevent crash at crossreferences to already deleted data 
    387387 
     388        sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ()); 
    388389        delete _player; 
    389390        _player = NULL;