feat: Add Player Event OnReleasedGhost
This commit is contained in:
@@ -643,7 +643,8 @@ public:
|
||||
PLAYERHOOK_ON_CAN_UPDATE_SKILL,
|
||||
PLAYERHOOK_ON_BEFORE_UPDATE_SKILL,
|
||||
PLAYERHOOK_ON_UPDATE_SKILL,
|
||||
PLAYERHOOK_CAN_RESURRECT
|
||||
PLAYERHOOK_CAN_RESURRECT,
|
||||
PLAYERHOOK_ON_PLAYER_RELEASED_GHOST
|
||||
}) { }
|
||||
|
||||
void OnPlayerResurrect(Player* player, float /*restore_percent*/, bool /*applySickness*/) override
|
||||
@@ -960,6 +961,11 @@ public:
|
||||
{
|
||||
return sALE->CanPlayerResurrect(player);
|
||||
}
|
||||
|
||||
void OnPlayerReleasedGhost(Player* player) override
|
||||
{
|
||||
sALE->OnPlayerReleasedGhost(player);
|
||||
}
|
||||
};
|
||||
|
||||
class ALE_ServerScript : public ServerScript
|
||||
|
||||
@@ -237,6 +237,7 @@ namespace Hooks
|
||||
PLAYER_EVENT_ON_MODIFY_SPELL_DAMAGE_TAKEN = 70, // (event, player, target, damage, spellInfo) - Can return new damage amount
|
||||
PLAYER_EVENT_ON_MODIFY_HEAL_RECEIVED = 71, // (event, player, target, heal, spellInfo) - Can return new heal amount
|
||||
PLAYER_EVENT_ON_DEAL_DAMAGE = 72, // (event, player, target, damage, damagetype) - Can return new damage amount
|
||||
PLAYER_EVENT_ON_RELEASED_GHOST = 73, // (event, player)
|
||||
|
||||
PLAYER_EVENT_COUNT
|
||||
};
|
||||
|
||||
@@ -512,6 +512,7 @@ public:
|
||||
void OnPlayerModifySpellDamageTaken(Player* player, Unit* target, int32& damage, SpellInfo const* spellInfo);
|
||||
void OnPlayerModifyHealReceived(Player* player, Unit* target, uint32& heal, SpellInfo const* spellInfo);
|
||||
uint32 OnPlayerDealDamage(Player* player, Unit* pVictim, uint32 damage, DamageEffectType damagetype);
|
||||
void OnPlayerReleasedGhost(Player* player);
|
||||
|
||||
/* Vehicle */
|
||||
void OnInstall(Vehicle* vehicle);
|
||||
|
||||
@@ -761,6 +761,13 @@ bool ALE::CanPlayerResurrect(Player* player)
|
||||
return CallAllFunctionsBool(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
void ALE::OnPlayerReleasedGhost(Player* player)
|
||||
{
|
||||
START_HOOK(PLAYER_EVENT_ON_RELEASED_GHOST);
|
||||
Push(player);
|
||||
CallAllFunctions(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
void ALE::OnPlayerQuestAccept(Player* player, Quest const* quest)
|
||||
{
|
||||
START_HOOK(PLAYER_EVENT_ON_QUEST_ACCEPT);
|
||||
|
||||
@@ -793,6 +793,7 @@ namespace LuaGlobalFunctions
|
||||
* PLAYER_EVENT_ON_MODIFY_SPELL_DAMAGE_TAKEN = 70, // (event, player, target, damage, spellInfo) - Can return new damage amount
|
||||
* PLAYER_EVENT_ON_MODIFY_HEAL_RECEIVED = 71, // (event, player, target, heal, spellInfo) - Can return new heal amount
|
||||
* PLAYER_EVENT_ON_DEAL_DAMAGE = 72, // (event, player, target, damage, damagetype) - Can return new damage amount
|
||||
* PLAYER_EVENT_ON_RELEASED_GHOST = 73, // (event, player)
|
||||
* };
|
||||
* </pre>
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user