Core/Spells: Implemented SPELL_EFFECT_RESURRECT_WITH_AURA (effect number 172)
This commit is contained in:
1 parent
35451c2307
commit
312e8509dd
7 files changed
+99
-37
No files matched your search
@@ -693,7 +693,7 @@ Player::Player(WorldSession* session): Unit(true), phaseMgr(this)
|
||||
|
||||
m_nextSave = sWorld->getIntConfig(CONFIG_INTERVAL_SAVE);
|
||||
|
||||
clearResurrectRequestData();
|
||||
_resurrectionData = NULL;
|
||||
|
||||
memset(m_items, 0, sizeof(Item*)*PLAYER_SLOTS_COUNT);
|
||||
|
||||
@@ -905,6 +905,8 @@ Player::~Player()
|
||||
for (uint8 i = 0; i < MAX_CUF_PROFILES; ++i)
|
||||
delete _CUFProfiles[i];
|
||||
|
||||
ClearResurrectRequestData();
|
||||
|
||||
sWorld->DecreasePlayerCount();
|
||||
}
|
||||
|
||||
@@ -1842,7 +1844,7 @@ void Player::setDeathState(DeathState s)
|
||||
// lost combo points at any target (targeted combo points clear in Unit::setDeathState)
|
||||
ClearComboPoints();
|
||||
|
||||
clearResurrectRequestData();
|
||||
ClearResurrectRequestData();
|
||||
|
||||
//FIXME: is pet dismissed at dying or releasing spirit? if second, add setDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD)
|
||||
RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
|
||||
@@ -2348,13 +2350,13 @@ void Player::ProcessDelayedOperations()
|
||||
{
|
||||
ResurrectPlayer(0.0f, false);
|
||||
|
||||
if (GetMaxHealth() > m_resurrectHealth)
|
||||
SetHealth(m_resurrectHealth);
|
||||
if (GetMaxHealth() > _resurrectionData->Health)
|
||||
SetHealth(_resurrectionData->Health);
|
||||
else
|
||||
SetFullHealth();
|
||||
|
||||
if (uint32(GetMaxPower(POWER_MANA)) > m_resurrectMana)
|
||||
SetPower(POWER_MANA, m_resurrectMana);
|
||||
if (uint32(GetMaxPower(POWER_MANA)) > _resurrectionData->Mana)
|
||||
SetPower(POWER_MANA, _resurrectionData->Mana);
|
||||
else
|
||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||
|
||||
@@ -2362,6 +2364,9 @@ void Player::ProcessDelayedOperations()
|
||||
SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
|
||||
SetPower(POWER_ECLIPSE, 0);
|
||||
|
||||
if (uint32 aura = _resurrectionData->Aura)
|
||||
CastSpell(this, aura, true, NULL, NULL, _resurrectionData->GUID);
|
||||
|
||||
SpawnCorpseBones();
|
||||
}
|
||||
|
||||
@@ -7505,7 +7510,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SetCurrency(uint32 id, uint32 count, bool printLog /*= true*/)
|
||||
void Player::SetCurrency(uint32 id, uint32 count, bool /*printLog*/ /*= true*/)
|
||||
{
|
||||
PlayerCurrenciesMap::iterator itr = _currencyStorage.find(id);
|
||||
if (itr == _currencyStorage.end())
|
||||
@@ -23557,7 +23562,9 @@ bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
|
||||
void Player::ResurectUsingRequestData()
|
||||
{
|
||||
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
float x, y, z, o;
|
||||
_resurrectionData->Location.GetPosition(x, y, z, o);
|
||||
TeleportTo(_resurrectionData->Location.GetMapId(), x, y, z, o);
|
||||
|
||||
if (IsBeingTeleported())
|
||||
{
|
||||
@@ -23567,13 +23574,13 @@ void Player::ResurectUsingRequestData()
|
||||
|
||||
ResurrectPlayer(0.0f, false);
|
||||
|
||||
if (GetMaxHealth() > m_resurrectHealth)
|
||||
SetHealth(m_resurrectHealth);
|
||||
if (GetMaxHealth() > _resurrectionData->Health)
|
||||
SetHealth(_resurrectionData->Health);
|
||||
else
|
||||
SetFullHealth();
|
||||
|
||||
if (uint32(GetMaxPower(POWER_MANA)) > m_resurrectMana)
|
||||
SetPower(POWER_MANA, m_resurrectMana);
|
||||
if (uint32(GetMaxPower(POWER_MANA)) > _resurrectionData->Mana)
|
||||
SetPower(POWER_MANA, _resurrectionData->Mana);
|
||||
else
|
||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||
|
||||
@@ -23582,6 +23589,9 @@ void Player::ResurectUsingRequestData()
|
||||
SetPower(POWER_FOCUS, GetMaxPower(POWER_FOCUS));
|
||||
SetPower(POWER_ECLIPSE, 0);
|
||||
|
||||
if (uint32 aura = _resurrectionData->Aura)
|
||||
CastSpell(this, aura, true, NULL, NULL, _resurrectionData->GUID);
|
||||
|
||||
SpawnCorpseBones();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user