Merge remote-tracking branch 'refs/remotes/azerothcore/master'

This commit is contained in:
Nefertumm
2017-06-30 02:25:01 -03:00
4 changed files with 40 additions and 0 deletions

View File

@@ -5148,6 +5148,8 @@ void Player::BuildPlayerRepop()
// set and clear other
SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
sScriptMgr->OnPlayerReleasedGhost(this);
}
void Player::ResurrectPlayer(float restore_percent, bool applySickness)

View File

@@ -1159,6 +1159,11 @@ bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target)
}
// Player
void ScriptMgr::OnPlayerReleasedGhost(Player* player)
{
FOREACH_SCRIPT(PlayerScript)->OnPlayerReleasedGhost(player);
}
void ScriptMgr::OnPVPKill(Player* killer, Player* killed)
{
FOREACH_SCRIPT(PlayerScript)->OnPVPKill(killer, killed);

View File

@@ -757,6 +757,7 @@ class PlayerScript : public ScriptObject
PlayerScript(const char* name);
public:
virtual void OnPlayerReleasedGhost(Player* /*player*/) { }
// Called when a player kills another player
virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { }
@@ -1171,6 +1172,7 @@ class ScriptMgr
public: /* PlayerScript */
void OnPlayerReleasedGhost(Player* player);
void OnPVPKill(Player* killer, Player* killed);
void OnCreatureKill(Player* killer, Creature* killed);
void OnPlayerKilledByCreature(Creature* killer, Player* killed);