aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/117_world_scripts.sql (renamed from sql/updates/117_trinityscript.sql)0
-rw-r--r--src/game/Chat.cpp8
-rw-r--r--src/game/Player.cpp5
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/WorldSession.cpp1
5 files changed, 10 insertions, 6 deletions
diff --git a/sql/updates/117_trinityscript.sql b/sql/updates/117_world_scripts.sql
index 0f0b9ecf7c2..0f0b9ecf7c2 100644
--- a/sql/updates/117_trinityscript.sql
+++ b/sql/updates/117_world_scripts.sql
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 67c79642631..0b1bf2e60b6 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -795,7 +795,13 @@ bool ChatHandler::ShowHelpForSubCommands(ChatCommand *table, char const* cmd, ch
if( *subcmd && !hasStringAbbr(table[i].Name, subcmd))
continue;
- (list += "\n ") += table[i].Name;
+ if(m_session)
+ list += "\n ";
+ else
+ list += "\n\r ";
+
+ list += table[i].Name;
+
if(table[i].ChildCommands)
list += " ...";
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 39ac45bde42..b976ff13890 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -433,10 +433,7 @@ Player::~Player ()
{
CleanupsBeforeDelete();
- if(m_uint32Values) // only for fully created Object
- {
- sSocialMgr.RemovePlayerSocial(GetGUIDLow());
- }
+ //m_social = NULL;
// Note: buy back item already deleted from DB when player was saved
for(int i = 0; i < PLAYER_SLOTS_COUNT; ++i)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 4783724d025..90dc40c89fc 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4898,7 +4898,7 @@ void Spell::EffectDuel(uint32 i)
Player *target = (Player*)unitTarget;
// caster or target already have requested duel
- if( caster->duel || target->duel || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) )
+ if( caster->duel || target->duel || !target->GetSocial() || target->GetSocial()->HasIgnore(caster->GetGUIDLow()) )
return;
// Players can only fight a duel with each other outside (=not inside dungeons and not in capital cities)
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index 7d9e2a365ac..129668be5b0 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -385,6 +385,7 @@ void WorldSession::LogoutPlayer(bool Save)
///- Delete the player object
_player->CleanupsBeforeDelete(); // do some cleanup before deleting to prevent crash at crossreferences to already deleted data
+ sSocialMgr.RemovePlayerSocial (_player->GetGUIDLow ());
delete _player;
_player = NULL;