diff options
| author | Spp <none@none> | 2010-09-15 13:23:07 +0200 |
|---|---|---|
| committer | Spp <none@none> | 2010-09-15 13:23:07 +0200 |
| commit | cc3d4cc8237f4b5eef391eddeb51ae63874bd5a7 (patch) | |
| tree | a5a8a77103da3df21ee897d7b70e75c5a753d25b /src/server/game/Server/Protocol | |
| parent | 9d9f18f9d28b496312c13d7e639c244b8fc33f3a (diff) | |
Core/Scripts: Add OnPlayerLogin, OnPlayerLogout, OnPlayerCreate and OnPlayerDelete
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Server/Protocol')
| -rw-r--r-- | src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 4c76cc077d8..120341d96ee 100644 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -471,8 +471,9 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) SendPacket(&data); std::string IP_str = GetRemoteAddress(); - sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow()); + sLog.outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow()); sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow()); + sScriptMgr.OnPlayerCreate(pNewChar); delete pNewChar; // created only to call SaveToDB() } @@ -522,6 +523,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data) std::string IP_str = GetRemoteAddress(); 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); if (sLog.IsOutCharDump()) // optimize GetPlayerDump call { @@ -801,6 +803,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) m_playerLoading = false; + sScriptMgr.OnPlayerLogin(pCurrChar); delete holder; } |
