

c'est Keep.GuardCaster je l'ai marquer plus hauttiens je me souvenais pas de ca mais en gros, si tu utilises le caster brain, il faut le mettre sur une classe qui sache le gérer (et les DOL.GS.Keep.xxx le font on dirait)
Je ne sais pas quelle classe peuvent. Les gardes sont qd meme un peu spécifiques



/*
INSERT INTO `linexspell` (`LineXSpell_ID`, `LineName`, `SpellID`, `Level`, `PackageID`) VALUES
('DOTxxx1', 'Mob Spells', 38015, 46, 'MOB');
INSERT INTO `spell` (`Spell_ID`, `SpellID`, `ClientEffect`, `Icon`, `Name`, `Description`, `Target`, `Range`, `Power`, `CastTime`, `Damage`, `DamageType`, `Type`, `Duration`, `Frequency`, `Pulse`, `PulsePower`, `Radius`, `RecastDelay`, `ResurrectHealth`, `ResurrectMana`, `Value`, `Concentration`, `LifeDrainReturn`, `AmnesiaChance`, `Message1`, `Message2`, `Message3`, `Message4`, `InstrumentRequirement`, `SpellGroup`, `EffectGroup`, `SubSpellID`, `MoveCast`, `Uninterruptible`, `IsPrimary`, `IsSecondary`, `AllowBolt`, `SharedTimerGroup`, `PackageID`, `IsFocus`) VALUES
('MOB_DOTxxxxxxxxxxxxxxx1', 38015, 9671, 9671, 'DOT MOB', 'Inflicts damage to the target repeatly over a given time period.', 'Enemy', 1500, 11, 3, 10, 15, 'DamageOverTime', 24, 20, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 'An acidic cloud surrounds you!', '{0} is surrounded by an acidic cloud!', '', '', 0, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 0, 'Reaver', 0);
* Niko
*
* Mob qui si il est touché au cac cast un DOT.
*
*/
using System;
using System.Collections;
using System.Reflection;
using DOL;
using DOL.Database;
using DOL.GS;
using DOL.GS.Effects;
using DOL.GS.Movement;
using DOL.GS.PacketHandler;
using DOL.GS.SkillHandler;
using DOL.GS.Spells;
using DOL.GS.Styles;
using log4net;
namespace DOL.GS
{
public class CastDotifCac : GameNPC
{
public CastDotifCac()
: base()
{
}
private static void CastDot(GameNPC npc, GameLiving target)
{
npc.TargetObject = target;
if (target != null && target is GamePlayer)
{
npc.TargetObject = target;
LaunchSpell(46, "Mob Spells", npc);
}
}
private eDamageType degat_crush = eDamageType.Crush;
private eDamageType degat_slash = eDamageType.Slash;
private eDamageType degat_thrust = eDamageType.Thrust;
public override void TakeDamage(GameObject source, eDamageType damageType, int damageAmount, int criticalAmount)
{
GameLiving target = this.TargetObject as GameLiving;
if (damageType == degat_crush || damageType == degat_slash || damageType == degat_thrust)
CastDot(this , target);
base.TakeDamage(source, damageType, damageAmount, criticalAmount);
}
public static void LaunchSpell(int spellLevel, string spellLineName, GameNPC npc)
{
if (npc.TargetObject == null) return;
Spell castSpell = null;
SpellLine castLine = null;
castLine = SkillBase.GetSpellLine(spellLineName);
IList spells = SkillBase.GetSpellList(castLine.KeyName);
foreach (Spell spell in spells)
{
if (spell.Level == spellLevel)
{
castSpell = spell;
break;
}
}
if (npc.AttackState)
npc.StopAttack();
npc.TurnTo(npc.TargetObject);
npc.CastSpell(castSpell, castLine);
}
}
}
if (!Body.AttackState && AggroLevel > 0)
{
CheckPlayerAggro();
CheckNPCAggro();
}
if (IsAggroing)
AttackMostWanted();



Users browsing this forum: No registered users and 1 guest