Core/Spells: Fixed Raise Ally

thx @Nayd for sniffs :)
thx @Shauren for helping to find all spell involved

* There is no implementation for stats update on Puppet class (only on Guardian) so same SummonProperty as Raise Dead Ghoul (non pet) is used.
(Default SummonProperties set category to SUMMON_CATEGORY_PUPPET)
* Override the Summon Effect to enable charm and stats scaling.
* PlayerAI is used to handle unaura on ghoul despawn or dead.
It's necessary due to the fact that all script hooks on ScriptedCreature are called on an unactive CreatureAI, resulting in creature being unable to handle unaura calls.
* Create UpdateAI call for Player class
* Stats scaling is based on forum and wowhead comments, they recall this ghoul as a copy of the other one (same stats).
* Spellscript for Ghoul spell Thrash

Closes #82
Closes #14830
This commit is contained in:
ccrs authored and Shauren committed 2016-01-08 00:10:15 +01:00
1 parent 91fa2154e8
commit e5d4005cc6
10 files changed
+432 -24

No files matched your search

+6 -11
View File
@@ -4207,21 +4207,16 @@ void Spell::SendResurrectRequest(Player* target)
{
// get resurrector name for creature resurrections, otherwise packet will be not accepted
// for player resurrections the name is looked up by guid
std::string const sentName(m_caster->GetTypeId() == TYPEID_PLAYER
? ""
: m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex()));
std::string const sentName(m_caster->GetTypeId() == TYPEID_PLAYER ?
"" : m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex()));
WorldPacket data(SMSG_RESURRECT_REQUEST, (8+4+sentName.size()+1+1+1+4));
WorldPacket data(SMSG_RESURRECT_REQUEST, 8 + 4 + sentName.size() + 1 + 1 + 1);
data << uint64(m_caster->GetGUID());
data << uint32(sentName.size() + 1);
data << sentName;
data << uint8(0); // null terminator
data << uint8(m_caster->GetTypeId() == TYPEID_PLAYER ? 0 : 1); // "you'll be afflicted with resurrection sickness"
data << uint8(m_caster->IsSpiritHealer()); // "you'll be afflicted with resurrection sickness"
// override delay sent with SMSG_CORPSE_RECLAIM_DELAY, set instant resurrection for spells with this attribute
if (m_spellInfo->HasAttribute(SPELL_ATTR3_IGNORE_RESURRECTION_TIMER))
data << uint32(0);
data << uint8(!m_spellInfo->HasAttribute(SPELL_ATTR3_IGNORE_RESURRECTION_TIMER));
target->GetSession()->SendPacket(&data);
}
@@ -5512,7 +5507,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
// dead owner (pets still alive when owners ressed?)
if (Unit* owner = m_caster->GetCharmerOrOwner())
if (!owner->IsAlive())
if (!owner->IsAlive() && !owner->IsGhouled())
return SPELL_FAILED_CASTER_DEAD;
if (!target && m_targets.GetUnitTarget())