Skip to content

Commit

Permalink
[9484] Add dummy aura effect of misc feign death spells
Browse files Browse the repository at this point in the history
Please note that it may not be correct to handle them all in the same way.
Some more research should be done regarding the whole issue with creatures and faking death (cheaters) and a possible difference between the spells.

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Feb 28, 2010
1 parent cf508c9 commit 4c5ad42
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
66 changes: 65 additions & 1 deletion src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,20 +2269,48 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
caster->CastSpell(caster, 13138, true, NULL, this);
return;
case 29266: // Permanent Feign Death
case 31261: // Permanent Feign Death (Root)
case 37493: // Feign Death
case 51329: // Feign Death
case 52593: // Bloated Abomination Feign Death
case 55795: // Falling Dragon Feign Death
case 57626: // Feign Death
case 57685: // Permanent Feign Death
case 58768: // Permanent Feign Death (Freeze Jumpend)
case 58806: // Permanent Feign Death (Drowned Anim)
case 58951: // Permanent Feign Death
case 64461: // Permanent Feign Death (No Anim) (Root)
case 65985: // Permanent Feign Death (Root Silence Pacify)
case 70630: // Frozen Aftermath - Feign Death
case 70592: // Permanent Feign Death
case 70628: // Permanent Feign Death
case 71598: // Feign Death
{
// Unclear what the difference really is between them.
// Some has effect1 that makes the difference, however not all.
// Some appear to be used depending on creature location, in water, at solid ground, in air/suspended, etc
// For now, just handle all the same way
if (m_target->GetTypeId() == TYPEID_UNIT)
m_target->SetFeignDeath(true);

return;
}
case 35356: // Spawn Feign Death
case 35357: // Spawn Feign Death
case 42557: // Feign Death
{
if (m_target->GetTypeId() == TYPEID_UNIT)
{
// flags not set like it's done in SetFeignDeath(), also this aura expected to be existing always/from spawn
// Flags not set like it's done in SetFeignDeath() and apparently always applied at spawn of creature
// All three does however have SPELL_EFFECT_SPAWN(46) as effect1
// It is possible this effect will remove some flags, and then the three here can be handled "normally"
m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);

m_target->addUnitState(UNIT_STAT_DIED);
}
return;
}
case 39850: // Rocket Blast
if(roll_chance_i(20)) // backfire stun
m_target->CastSpell(m_target, 51581, true, NULL, this);
Expand Down Expand Up @@ -2447,6 +2475,42 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
m_target->CastSpell(m_target, 28240, true, NULL, this);
return;
}
case 29266: // Permanent Feign Death
case 31261: // Permanent Feign Death (Root)
case 37493: // Feign Death
case 51329: // Feign Death
case 52593: // Bloated Abomination Feign Death
case 55795: // Falling Dragon Feign Death
case 57626: // Feign Death
case 57685: // Permanent Feign Death
case 58768: // Permanent Feign Death (Freeze Jumpend)
case 58806: // Permanent Feign Death (Drowned Anim)
case 58951: // Permanent Feign Death
case 64461: // Permanent Feign Death (No Anim) (Root)
case 65985: // Permanent Feign Death (Root Silence Pacify)
case 70630: // Frozen Aftermath - Feign Death
case 70592: // Permanent Feign Death
case 70628: // Permanent Feign Death
case 71598: // Feign Death
{
if (m_target->GetTypeId() == TYPEID_UNIT)
m_target->SetFeignDeath(false);

return;
}
case 35356: // Spawn Feign Death
case 35357: // Spawn Feign Death
case 42557: // Feign Death
{
if (m_target->GetTypeId() == TYPEID_UNIT)
{
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);

m_target->clearUnitState(UNIT_STAT_DIED);
}
return;
}
case 32286: // Focus Target Visual
{
if (m_removeMode == AURA_REMOVE_BY_DEFAULT)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9483"
#define REVISION_NR "9484"
#endif // __REVISION_NR_H__

0 comments on commit 4c5ad42

Please sign in to comment.