Core/Auras: Implemented SPELL_AURA_PREVENT_RESSURECTION
This commit is contained in:
@@ -1751,7 +1751,7 @@ void Player::Update(uint32 p_time)
|
||||
}
|
||||
|
||||
// not auto-free ghost from body in instances
|
||||
if (m_deathTimer > 0 && !GetBaseMap()->Instanceable())
|
||||
if (m_deathTimer > 0 && !GetBaseMap()->Instanceable() && !HasAuraType(SPELL_AURA_PREVENT_RESSURECTION))
|
||||
{
|
||||
if (p_time >= m_deathTimer)
|
||||
{
|
||||
@@ -5165,7 +5165,8 @@ bool Player::FallGround(uint8 FallMode)
|
||||
|
||||
void Player::KillPlayer()
|
||||
{
|
||||
if (IsFlying() && !GetTransport()) FallGround();
|
||||
if (IsFlying() && !GetTransport())
|
||||
FallGround();
|
||||
|
||||
SetMovement(MOVE_ROOT);
|
||||
|
||||
@@ -5175,7 +5176,7 @@ void Player::KillPlayer()
|
||||
//SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_IN_PVP);
|
||||
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable());
|
||||
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable() && !HasAuraType(SPELL_AURA_PREVENT_RESSURECTION));
|
||||
|
||||
// 6 minutes until repop at graveyard
|
||||
m_deathTimer = 6 * MINUTE * IN_MILLISECONDS;
|
||||
|
||||
@@ -60,6 +60,9 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
|
||||
if (GetPlayer()->isAlive() || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
|
||||
return;
|
||||
|
||||
if (GetPlayer()->HasAuraType(SPELL_AURA_PREVENT_RESSURECTION))
|
||||
return; // silently return, client should display the error by itself
|
||||
|
||||
// the world update order is sessions, players, creatures
|
||||
// the netcode runs in parallel with all of these
|
||||
// creatures can kill players
|
||||
|
||||
@@ -367,7 +367,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNULL, //311 0 spells in 3.3.5
|
||||
&AuraEffect::HandleNULL, //312 0 spells in 3.3.5
|
||||
&AuraEffect::HandleNULL, //313 0 spells in 3.3.5
|
||||
&AuraEffect::HandleNoImmediateEffect, //314 SPELL_AURA_PREVENT_RESSURECTION todo
|
||||
&AuraEffect::HandlePreventResurrection, //314 SPELL_AURA_PREVENT_RESSURECTION todo
|
||||
&AuraEffect::HandleNoImmediateEffect, //315 SPELL_AURA_UNDERWATER_WALKING todo
|
||||
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_PERIODIC_HASTE implemented in AuraEffect::CalculatePeriodic
|
||||
};
|
||||
@@ -5600,6 +5600,20 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandlePreventResurrection(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
return;
|
||||
|
||||
if (aurApp->GetTarget()->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (apply)
|
||||
aurApp->GetTarget()->RemoveByteFlag(PLAYER_FIELD_BYTES, 0, PLAYER_FIELD_BYTE_RELEASE_TIMER);
|
||||
else if (!aurApp->GetTarget()->GetBaseMap()->Instanceable())
|
||||
aurApp->GetTarget()->SetByteFlag(PLAYER_FIELD_BYTES, 0, PLAYER_FIELD_BYTE_RELEASE_TIMER);
|
||||
}
|
||||
|
||||
void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
{
|
||||
switch (GetSpellInfo()->SpellFamilyName)
|
||||
|
||||
@@ -277,6 +277,7 @@ class AuraEffect
|
||||
void HandleAuraModFakeInebriation(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraOverrideSpells(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandlePreventResurrection(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
|
||||
// aura effect periodic tick handlers
|
||||
void HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const;
|
||||
|
||||
Reference in New Issue
Block a user