Here's Exeption , it happens when i try to hit a player with fastblade or SS(not sure exactly when it happens)
this is the void of GetMobTargetsQuote:
System.NullReferenceException: Object reference not set to an instance of an object.
to COEmulator.Features.SkillsClass.SkillUse.GetMobTar gets (UInt32 Single) in
C: \ COEmulator \ Features \ skills.ca: line 232
to COEmulator.Features.SkillsClass.SkillUse.GetTarget s (UInt32 Single) in
C: \COEmulator \ Features \ skills.ca: line 147
PHP Code:
void GetMobTargets(uint Single)
{
if (Info.ExtraEff == ExtraEffect.Ride || Info.ExtraEff == ExtraEffect.UnMount) return;
if (Info.Targetting == TargetType.Single)
{
if (World.H_Mobs.Contains(User.Loc.Map))
{
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];
if (M != null && M.Alive)
MobTargets.Add(M, GetDamage(M));
}
}
else
{
bool RangeFromChar = true;
if (Info.Targetting == TargetType.FromSingle)
{
Mob M = (Mob)((Hashtable)(World.H_Mobs[User.Loc.Map]))[Single];
if (M != null && M.Alive)
{
MobTargets.Add(M, GetDamage(M));
AimX = M.Loc.X;
AimY = M.Loc.Y;
RangeFromChar = false;
}
}
else if (Info.Targetting != TargetType.Sector && Info.Targetting != TargetType.Linear && Info.Targetting != TargetType.Range && Info.Targetting != TargetType.FromPoint)
{
AimX = User.Loc.X;
AimY = User.Loc.Y;
RangeFromChar = true;
}
else
RangeFromChar = false;
Hashtable MapMobs = (Hashtable)World.H_Mobs[User.Loc.Map];
if (MapMobs != null)
foreach (Mob M in MapMobs.Values)
{
if (M.Alive)
{
if ((!RangeFromChar && MyMath.PointDistance(AimX, AimY, M.Loc.X, M.Loc.Y) <= Info.MaxDist) || MyMath.PointDistance(User.Loc.X, User.Loc.Y, M.Loc.X, M.Loc.Y) <= Info.MaxDist)
if (Info.Targetting == TargetType.Sector && InSector(M.Loc.X, M.Loc.Y) || Info.Targetting != TargetType.Sector)
if (Info.Targetting == TargetType.Linear && MyMath.PointDirecton(User.Loc.X, User.Loc.Y, AimX, AimY) == MyMath.PointDirecton(User.Loc.X, User.Loc.Y, M.Loc.X, M.Loc.Y) || Info.Targetting != TargetType.Linear)
if (User.PKMode == PKMode.PK || !M.NeedsPKMode && !MobTargets.Contains(M))
MobTargets.Add(M, GetDamage(M));
}
}
}
}
PHP Code:
public void GetTargets(uint Single)
{
try
{
GetMobTargets(Single);
GetPlayerTargets(Single);
GetNPCTargets(Single);
GetMiscTargets(Single);
}
catch (Exception Exc) { Program.WriteLine(Exc); }
}
PS: don't do it for me, i'm here to learn , i need an explanation of what's wrong and how to fix it






