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