В void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply):
Код:
case 46620: // Red Dragonblood
{
if (apply)
if(Unit* caster = GetCaster())
if (caster->GetTypeId() == TYPEID_PLAYER && caster->isAlive() && m_target->GetTypeId() == TYPEID_UNIT && m_target->isAlive())
((Creature*)m_target)->AI()->AttackStart(caster);
else
{
cast_at_remove = true;
spellId1 = 46673; // Capture Trigger
}
break;
}
Не отрабатывает при отмене, может, не так написал.
В обработке думми-аур:
Код:
case 46675:
if (target->GetTypeId() != TYPEID_UNIT)
return;
if (Unit* caster = GetCaster())
if (caster->GetTypeId() == TYPEID_PLAYER)
{
target->AttackStop();
target->CombatStop(true);
target->setFaction(35);
// Drake Hatchling Subdued
target->CastSpell(caster, 46691, true, NULL, this);
// Rope Beam
target->CastSpell(caster, 46674, true, NULL, this);
//target->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
// allow script for the process of returning the NPC
return;
Это начальный код, хочу реализовать квест Охота на драконов, а по сниффу там 13 спеллов с думми.