mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #11976 from Ascathor/master
Core/Misc: New ability to log account IP access history
This commit is contained in:
@@ -224,6 +224,7 @@ void ScriptMgr::Unload()
|
||||
SCR_CLEAR(TransportScript);
|
||||
SCR_CLEAR(AchievementCriteriaScript);
|
||||
SCR_CLEAR(PlayerScript);
|
||||
SCR_CLEAR(AccountScript);
|
||||
SCR_CLEAR(GuildScript);
|
||||
SCR_CLEAR(GroupScript);
|
||||
SCR_CLEAR(UnitScript);
|
||||
@@ -1257,9 +1258,14 @@ void ScriptMgr::OnPlayerCreate(Player* player)
|
||||
FOREACH_SCRIPT(PlayerScript)->OnCreate(player);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerDelete(uint64 guid)
|
||||
void ScriptMgr::OnPlayerDelete(uint64 guid, uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnDelete(guid);
|
||||
FOREACH_SCRIPT(PlayerScript)->OnDelete(guid, accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerFailedDelete(uint64 guid, uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnFailedDelete(guid, accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerSave(Player* player)
|
||||
@@ -1277,6 +1283,37 @@ void ScriptMgr::OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newAre
|
||||
FOREACH_SCRIPT(PlayerScript)->OnUpdateZone(player, newZone, newArea);
|
||||
}
|
||||
|
||||
// Account
|
||||
void ScriptMgr::OnAccountLogin(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnAccountLogin(accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnFailedAccountLogin(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnFailedAccountLogin(accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnEmailChange(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnEmailChange(accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnFailedEmailChange(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnFailedEmailChange(accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPasswordChange(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnPasswordChange(accountId);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnFailedPasswordChange(uint32 accountId)
|
||||
{
|
||||
FOREACH_SCRIPT(AccountScript)->OnFailedPasswordChange(accountId);
|
||||
}
|
||||
|
||||
// Guild
|
||||
void ScriptMgr::OnGuildAddMember(Guild* guild, Player* player, uint8& plRank)
|
||||
{
|
||||
@@ -1539,6 +1576,12 @@ PlayerScript::PlayerScript(const char* name)
|
||||
ScriptRegistry<PlayerScript>::AddScript(this);
|
||||
}
|
||||
|
||||
AccountScript::AccountScript(const char* name)
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AccountScript>::AddScript(this);
|
||||
}
|
||||
|
||||
GuildScript::GuildScript(const char* name)
|
||||
: ScriptObject(name)
|
||||
{
|
||||
@@ -1581,6 +1624,7 @@ template class ScriptRegistry<PlayerScript>;
|
||||
template class ScriptRegistry<GuildScript>;
|
||||
template class ScriptRegistry<GroupScript>;
|
||||
template class ScriptRegistry<UnitScript>;
|
||||
template class ScriptRegistry<AccountScript>;
|
||||
|
||||
// Undefine utility macros.
|
||||
#undef GET_SCRIPT_RET
|
||||
|
||||
Reference in New Issue
Block a user