コード例 #1
0
        void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
        {
            Unit caster = GetCaster();

            if (caster)
            {
                CreatureAI gormokAI = GetTarget().ToCreature().GetAI();
                if (gormokAI != null)
                {
                    Unit target = gormokAI.SelectTarget(SelectAggroTarget.Random, 0, new SnobolledTargetSelector(GetTarget()));
                    if (target)
                    {
                        gormokAI.Talk(TextIds.EmoteSnobolled);
                        caster.GetAI().DoAction(Actions.ActiveSnobold);
                        caster.CastSpell(target, SpellIds.RidePlayer, true);
                    }
                }
            }
        }