mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Added possibility to cast spells with triggered flag using SCRIPT_COMMAND_CAST_SPELL, original patch by Az@zel
Fixed SCRIPT_COMMAND_CAST_SPELL for casting on creatures with selected entry --HG-- branch : trunk
This commit is contained in:
@@ -3583,7 +3583,7 @@ void Map::ScriptsProcess()
|
||||
uSource = dynamic_cast<Unit*>(target);
|
||||
uTarget = dynamic_cast<Unit*>(source);
|
||||
break;
|
||||
case 4: // creature
|
||||
case 4: // source -> creature with entry
|
||||
uSource = dynamic_cast<Unit*>(source);
|
||||
uTarget = GetClosestCreatureWithEntry(uSource, step.script->dataint, step.script->x);
|
||||
break;
|
||||
@@ -3601,7 +3601,8 @@ void Map::ScriptsProcess()
|
||||
break;
|
||||
}
|
||||
|
||||
uSource->CastSpell(uTarget, step.script->datalong, false);
|
||||
bool triggered = step.script->dataint & 0x1;
|
||||
uSource->CastSpell(uTarget, step.script->datalong, triggered);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user