aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authormegamage <none@none.none>2011-10-08 16:24:07 -0400
committermegamage <none@none.none>2011-10-08 16:24:07 -0400
commit45de1f01e014f4f473ccd7a4e8d54d61183da1d0 (patch)
treec7d7cde1851fd279a27c5f4727a00b8f3416d325 /src/server/game/Server
parent0bb86a3e97cf720512ae00c9bee209a30c5fb928 (diff)
Update char name data when create/delete char.
Diffstat (limited to 'src/server/game/Server')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CharacterHandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 35fea620cfd..d4ca425d606 100755
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -686,6 +686,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sLog->outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sScriptMgr->OnPlayerCreate(&newChar);
+ sWorld->AddCharacterNameData(newChar.GetGUIDLow(), std::string(newChar.GetName()), newChar.getGender(), newChar.getRace(), newChar.getClass());
delete createInfo;
_charCreateCallback.SetParam(NULL);
@@ -741,6 +742,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sScriptMgr->OnPlayerDelete(guid);
+ sWorld->DeleteCharaceterNameData(guid);
if (sLog->IsOutCharDump()) // optimize GetPlayerDump call
{