mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
@@ -68,6 +68,8 @@ namespace AccountMgr
|
||||
if (!result)
|
||||
return AOR_NAME_NOT_EXIST;
|
||||
|
||||
sScriptMgr->OnBeforeAccountDelete(accountId);
|
||||
|
||||
// Obtain accounts characters
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARS_BY_ACCOUNT_ID);
|
||||
stmt->SetData(0, accountId);
|
||||
|
||||
@@ -27,6 +27,14 @@ void ScriptMgr::OnAccountLogin(uint32 accountId)
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeAccountDelete(uint32 accountId)
|
||||
{
|
||||
ExecuteScript<AccountScript>([&](AccountScript* script)
|
||||
{
|
||||
script->OnBeforeAccountDelete(accountId);
|
||||
});
|
||||
}
|
||||
|
||||
//void ScriptMgr::OnAccountLogout(uint32 accountId)
|
||||
//{
|
||||
// ExecuteScript<AccountScript>([&](AccountScript* script)
|
||||
|
||||
@@ -29,6 +29,9 @@ public:
|
||||
// Called when an account logged in successfully
|
||||
virtual void OnAccountLogin(uint32 /*accountId*/) { }
|
||||
|
||||
// Called when an account is about to be deleted
|
||||
virtual void OnBeforeAccountDelete(uint32 /*accountId*/) { }
|
||||
|
||||
// Called when an ip logged in successfully
|
||||
virtual void OnLastIpUpdate(uint32 /*accountId*/, std::string /*ip*/) { }
|
||||
|
||||
|
||||
@@ -469,6 +469,7 @@ public: /* PlayerScript */
|
||||
|
||||
public: /* AccountScript */
|
||||
void OnAccountLogin(uint32 accountId);
|
||||
void OnBeforeAccountDelete(uint32 accountId);
|
||||
void OnLastIpUpdate(uint32 accountId, std::string ip);
|
||||
void OnFailedAccountLogin(uint32 accountId);
|
||||
void OnEmailChange(uint32 accountId);
|
||||
|
||||
Reference in New Issue
Block a user