Effects packets (#308)
- [X] Changes effect packets - [X] Updates playing sounds - [X] Updates Effects class to have more options so there are less direct calls to building the packets - [X] Changes bonding status packet
This commit is contained in:
parent
1c9439e4fd
commit
361ec4dba4
53 changed files with 958 additions and 833 deletions
|
|
@ -67,7 +67,7 @@ namespace Server.Spells.Chivalry
|
|||
20,
|
||||
5042
|
||||
);
|
||||
Effects.PlaySound(m, m.Map, 0x201);
|
||||
Effects.PlaySound(m, 0x201);
|
||||
|
||||
m.Delete();
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Fifth
|
|||
eastToWest = false;
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x20B);
|
||||
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20B);
|
||||
|
||||
var itemID = eastToWest ? 0x3915 : 0x3922;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ namespace Server.Spells.Fourth
|
|||
|
||||
var map = Caster.Map;
|
||||
var directTarget = p as Mobile;
|
||||
var loc = new Point3D(p);
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
|
|
@ -54,13 +55,13 @@ namespace Server.Spells.Fourth
|
|||
targets.Add(directTarget);
|
||||
}
|
||||
|
||||
var eable = map.GetMobilesInRange(new Point3D(p), 2);
|
||||
var eable = map.GetMobilesInRange(loc, 2);
|
||||
targets.AddRange(eable.Where(m => m != directTarget).Where(m => AreaCanTarget(m, feluccaRules)));
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x299);
|
||||
Effects.PlaySound(loc, Caster.Map, 0x299);
|
||||
|
||||
if (targets.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,9 +40,11 @@ namespace Server.Spells.Fourth
|
|||
|
||||
SpellHelper.GetSurfaceTop(ref p);
|
||||
|
||||
var loc = new Point3D(p);
|
||||
|
||||
if (!Core.AOS)
|
||||
{
|
||||
Effects.PlaySound(p, Caster.Map, 0x299);
|
||||
Effects.PlaySound(loc, Caster.Map, 0x299);
|
||||
}
|
||||
|
||||
if (Caster.Map == null)
|
||||
|
|
@ -51,7 +53,7 @@ namespace Server.Spells.Fourth
|
|||
return;
|
||||
}
|
||||
|
||||
var targets = Caster.Map.GetMobilesInRange(new Point3D(p), Core.AOS ? 2 : 3)
|
||||
var targets = Caster.Map.GetMobilesInRange(loc, Core.AOS ? 2 : 3)
|
||||
.Where(m => Caster.CanBeBeneficial(m, false));
|
||||
|
||||
if (Core.AOS)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Fourth
|
|||
eastToWest = false;
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x20C);
|
||||
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20C);
|
||||
|
||||
var itemID = eastToWest ? 0x398C : 0x3996;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,11 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
if (map != null)
|
||||
{
|
||||
PlayEffect(p, Caster.Map);
|
||||
var loc = new Point3D(p);
|
||||
|
||||
foreach (var m in map.GetMobilesInRange(new Point3D(p), 2))
|
||||
PlayEffect(loc, Caster.Map);
|
||||
|
||||
foreach (var m in map.GetMobilesInRange(loc, 2))
|
||||
{
|
||||
if (m == Caster)
|
||||
{
|
||||
|
|
@ -94,7 +96,7 @@ namespace Server.Spells.Mysticism
|
|||
Caster.Target = new SpellTargetPoint3D(this);
|
||||
}
|
||||
|
||||
private static void PlayEffect(IPoint3D p, Map map)
|
||||
private static void PlayEffect(Point3D p, Map map)
|
||||
{
|
||||
Effects.PlaySound(p, map, 0x64F);
|
||||
|
||||
|
|
@ -105,7 +107,7 @@ namespace Server.Spells.Mysticism
|
|||
PlaySingleEffect(p, map, -1, 1, 1, 3);
|
||||
}
|
||||
|
||||
private static void PlaySingleEffect(IPoint3D p, Map map, int a, int b, int c, int d)
|
||||
private static void PlaySingleEffect(Point3D p, Map map, int a, int b, int c, int d)
|
||||
{
|
||||
int x = p.X, y = p.Y, z = p.Z + 18;
|
||||
|
||||
|
|
@ -120,25 +122,20 @@ namespace Server.Spells.Mysticism
|
|||
SendEffectPacket(p, map, new Point3D(x + a, y + c, z), new Point3D(x + a, y + d, z));
|
||||
}
|
||||
|
||||
private static void SendEffectPacket(IPoint3D p, Map map, Point3D orig, Point3D dest)
|
||||
private static void SendEffectPacket(Point3D p, Map map, Point3D orig, Point3D dest)
|
||||
{
|
||||
Effects.SendPacket(
|
||||
Effects.SendMovingEffect(
|
||||
p,
|
||||
map,
|
||||
new HuedEffect(
|
||||
EffectType.Moving,
|
||||
Serial.Zero,
|
||||
Serial.Zero,
|
||||
0x36D4,
|
||||
orig,
|
||||
dest,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0x63,
|
||||
0x4
|
||||
)
|
||||
0x36D4,
|
||||
orig,
|
||||
dest,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0x63,
|
||||
0x4
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,9 +54,11 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
if (map != null)
|
||||
{
|
||||
PlayEffect(p, Caster.Map);
|
||||
var loc = new Point3D(p);
|
||||
|
||||
foreach (var m in map.GetMobilesInRange(new Point3D(p), 2))
|
||||
PlayEffect(loc, Caster.Map);
|
||||
|
||||
foreach (var m in map.GetMobilesInRange(loc, 2))
|
||||
{
|
||||
if (m == Caster)
|
||||
{
|
||||
|
|
@ -103,7 +105,7 @@ namespace Server.Spells.Mysticism
|
|||
Caster.Target = new SpellTargetPoint3D(this);
|
||||
}
|
||||
|
||||
private static void PlayEffect(IPoint3D p, Map map)
|
||||
private static void PlayEffect(Point3D p, Map map)
|
||||
{
|
||||
Effects.PlaySound(p, map, 0x64F);
|
||||
|
||||
|
|
@ -114,7 +116,7 @@ namespace Server.Spells.Mysticism
|
|||
PlaySingleEffect(p, map, -1, 1, 1, 3);
|
||||
}
|
||||
|
||||
private static void PlaySingleEffect(IPoint3D p, Map map, int a, int b, int c, int d)
|
||||
private static void PlaySingleEffect(Point3D p, Map map, int a, int b, int c, int d)
|
||||
{
|
||||
int x = p.X, y = p.Y, z = p.Z + 18;
|
||||
|
||||
|
|
@ -129,25 +131,20 @@ namespace Server.Spells.Mysticism
|
|||
SendEffectPacket(p, map, new Point3D(x + a, y + c, z), new Point3D(x + a, y + d, z));
|
||||
}
|
||||
|
||||
private static void SendEffectPacket(IPoint3D p, Map map, Point3D orig, Point3D dest)
|
||||
private static void SendEffectPacket(Point3D p, Map map, Point3D orig, Point3D dest)
|
||||
{
|
||||
Effects.SendPacket(
|
||||
Effects.SendMovingEffect(
|
||||
p,
|
||||
map,
|
||||
new HuedEffect(
|
||||
EffectType.Moving,
|
||||
Serial.Zero,
|
||||
Serial.Zero,
|
||||
0x375A,
|
||||
orig,
|
||||
dest,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0x49A,
|
||||
0x4
|
||||
)
|
||||
0x375A,
|
||||
orig,
|
||||
dest,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0x49A,
|
||||
0x4
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Seventh
|
|||
eastToWest = false;
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x20B);
|
||||
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20B);
|
||||
|
||||
TimeSpan duration;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace Server.Spells.Seventh
|
|||
20,
|
||||
5042
|
||||
);
|
||||
Effects.PlaySound(bc, bc.Map, 0x201);
|
||||
Effects.PlaySound(bc, 0x201);
|
||||
|
||||
bc.Delete();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,11 @@ namespace Server.Spells.Seventh
|
|||
var map = Caster.Map;
|
||||
|
||||
var playerVsPlayer = false;
|
||||
var loc = new Point3D(p);
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
var eable = map.GetMobilesInRange(new Point3D(p), 2);
|
||||
var eable = map.GetMobilesInRange(loc, 2);
|
||||
|
||||
targets = eable.Where(
|
||||
m =>
|
||||
|
|
@ -86,7 +87,7 @@ namespace Server.Spells.Seventh
|
|||
|
||||
if (targets.Count > 0)
|
||||
{
|
||||
Effects.PlaySound(p, Caster.Map, 0x160);
|
||||
Effects.PlaySound(loc, Caster.Map, 0x160);
|
||||
|
||||
if (Core.AOS && targets.Count > 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Server.Spells.Sixth
|
|||
20,
|
||||
5042
|
||||
);
|
||||
Effects.PlaySound(m, m.Map, 0x201);
|
||||
Effects.PlaySound(m, 0x201);
|
||||
|
||||
m.Delete();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace Server.Spells.Sixth
|
|||
rune.Mark(Caster);
|
||||
|
||||
Caster.PlaySound(0x1FA);
|
||||
Effects.SendLocationEffect(Caster, Caster.Map, 14201, 16);
|
||||
Effects.SendLocationEffect(Caster, 14201, 16);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace Server.Spells.Sixth
|
|||
eastToWest = false;
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x20B);
|
||||
Effects.PlaySound(new Point3D(p), Caster.Map, 0x20B);
|
||||
|
||||
var itemID = eastToWest ? 0x3967 : 0x3979;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,16 +27,17 @@ namespace Server.Spells.Third
|
|||
if (CheckSequence())
|
||||
{
|
||||
SpellHelper.Turn(Caster, p);
|
||||
var loc = new Point3D(p);
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(new Point3D(p), Caster.Map, EffectItem.DefaultDuration),
|
||||
EffectItem.Create(loc, Caster.Map, EffectItem.DefaultDuration),
|
||||
0x376A,
|
||||
9,
|
||||
32,
|
||||
5024
|
||||
);
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x1FF);
|
||||
Effects.PlaySound(loc, Caster.Map, 0x1FF);
|
||||
|
||||
if (p is Mobile)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ namespace Server.Spells.Third
|
|||
eastToWest = false;
|
||||
}
|
||||
|
||||
Effects.PlaySound(p, Caster.Map, 0x1F6);
|
||||
Effects.PlaySound(new Point3D(p), Caster.Map, 0x1F6);
|
||||
|
||||
for (var i = -1; i <= 1; ++i)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue