rendered paste bodyPlayer.cpp
(line 36)
bSafeFall = false;
+ bReincarnate = false;
SoulStone = 0;
Player.h
(line 885)
int m_lifetapbonus;
uint32 m_lastShotTime;
+ bool bReincarnate
SpellAuras.cpp
(line 1391)
case 23701://Darkmoon Card: Twisting Nether give 10% chance to self resurrect ->cast 23700
{
//if(!apply)
}break;
+ case 20608://Reincarnation
+ {
+ if(apply)
+ {
+ m_target->bReincarnate = true;
+ }
+ else
+ {
+ m_target->bReincarnate = false;
+ }
+ }
Object.cpp
(line 1457)
/* Set victim health to 0 */
pVictim->SetUInt32Value(UNIT_FIELD_HEALTH, 0);
if(pVictim->IsPlayer())
{
if(((Player*)pVictim)->SoulStone)
pVictim->SetUInt32Value(PLAYER_SELF_RES_SPELL,((Player*)pVictim)->SoulStone);
pVictim->SetUInt32Value( UNIT_FIELD_MOUNTDISPLAYID , 0);
if(pVictim->HasFlag( UNIT_FIELD_FLAGS , U_FIELD_FLAG_MOUNT_SIT ))
pVictim->RemoveFlag( UNIT_FIELD_FLAGS , U_FIELD_FLAG_MOUNT_SIT );
+ if(((Player*)pVictim)->bReincarnate)
+ {
+ SpellEntry *m_reincarnSpell = sSpellStore.LookupEntry(20608);
+ if(((Player*)pVictim)->CanCastDueToCooldown(m_reincarnSpell)
+ {
+ uint32 ankh_count = ((Player*)pVictim)->GetItemInterface()->GetItemCount(17030,false);
+ if(ankh_count > 0)
+ {
+ pVictim->SetUInt32Value(PLAYER_SELF_RES_SPELL,21169);
+ m_reincarnSpell->AddStartCooldown();
+ }
+ }
+ }