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
|
|
@ -2278,7 +2278,7 @@ namespace Server.Mobiles
|
|||
20,
|
||||
5042
|
||||
);
|
||||
Effects.PlaySound(m, m.Map, 0x201);
|
||||
Effects.PlaySound(m, 0x201);
|
||||
|
||||
m.Delete();
|
||||
}
|
||||
|
|
@ -3216,12 +3216,7 @@ namespace Server.Mobiles
|
|||
|
||||
if (IsBonded)
|
||||
{
|
||||
var sound = GetDeathSound();
|
||||
|
||||
if (sound >= 0)
|
||||
{
|
||||
Effects.PlaySound(this, Map, sound);
|
||||
}
|
||||
Effects.PlaySound(this, GetDeathSound());
|
||||
|
||||
Warmode = false;
|
||||
|
||||
|
|
@ -3845,7 +3840,9 @@ namespace Server.Mobiles
|
|||
|
||||
IsDeadPet = false;
|
||||
|
||||
Effects.SendPacket(Location, Map, new BondedStatus(Serial, false));
|
||||
Span<byte> buffer = stackalloc byte[OutgoingMobilePackets.BondedStatusPacketLength];
|
||||
OutgoingMobilePackets.CreateBondedStatus(ref buffer, Serial, false);
|
||||
Effects.SendPacket(Location, Map, ref buffer);
|
||||
|
||||
SendIncomingPacket();
|
||||
SendIncomingPacket();
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@ namespace Server.Mobiles
|
|||
LootPack.FilthyRich.Generate(this, rm.Backpack, false, LootPack.GetLuckChanceForKiller(this));
|
||||
}
|
||||
|
||||
Effects.PlaySound(this, Map, GetDeathSound());
|
||||
Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x835, 0);
|
||||
Effects.PlaySound(this, GetDeathSound());
|
||||
Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x835);
|
||||
rm.MoveToWorld(Location, Map);
|
||||
|
||||
Delete();
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ namespace Server.Mobiles
|
|||
LootPack.FilthyRich.Generate(this, rm.Backpack, false, LootPack.GetLuckChanceForKiller(this));
|
||||
}
|
||||
|
||||
Effects.PlaySound(this, Map, GetDeathSound());
|
||||
Effects.PlaySound(this, GetDeathSound());
|
||||
Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x835, 0);
|
||||
rm.MoveToWorld(Location, Map);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,68 +78,42 @@ namespace Server.Mobiles
|
|||
* Effect: damage is dealt to the attacker, no damage is taken by the fan dancer
|
||||
*/
|
||||
|
||||
private void ThrowFan(Mobile to)
|
||||
{
|
||||
if (!(Utility.RandomDouble() < 0.8) || to.InRange(this, 1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fan Throw
|
||||
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
|
||||
* Damage: 50-65
|
||||
*/
|
||||
Effects.SendMovingEffect(
|
||||
to.Location,
|
||||
to.Map,
|
||||
0x27A3,
|
||||
Location,
|
||||
to.Location,
|
||||
10,
|
||||
0,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
AOS.Damage(to, this, Utility.RandomMinMax(50, 65), 100, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
public override void OnDamagedBySpell(Mobile attacker)
|
||||
{
|
||||
base.OnDamagedBySpell(attacker);
|
||||
|
||||
if (Utility.RandomDouble() < 0.8 && !attacker.InRange(this, 1))
|
||||
{
|
||||
/* Fan Throw
|
||||
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
|
||||
* Damage: 50-65
|
||||
*/
|
||||
Effects.SendPacket(
|
||||
attacker,
|
||||
attacker.Map,
|
||||
new HuedEffect(
|
||||
EffectType.Moving,
|
||||
Serial.Zero,
|
||||
Serial.Zero,
|
||||
0x27A3,
|
||||
Location,
|
||||
attacker.Location,
|
||||
10,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0,
|
||||
0
|
||||
)
|
||||
);
|
||||
AOS.Damage(attacker, this, Utility.RandomMinMax(50, 65), 100, 0, 0, 0, 0);
|
||||
}
|
||||
ThrowFan(attacker);
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
if (Utility.RandomDouble() < 0.8 && !attacker.InRange(this, 1))
|
||||
{
|
||||
/* Fan Throw
|
||||
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
|
||||
* Damage: 50-65
|
||||
*/
|
||||
Effects.SendPacket(
|
||||
attacker,
|
||||
attacker.Map,
|
||||
new HuedEffect(
|
||||
EffectType.Moving,
|
||||
Serial.Zero,
|
||||
Serial.Zero,
|
||||
0x27A3,
|
||||
Location,
|
||||
attacker.Location,
|
||||
10,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
0,
|
||||
0
|
||||
)
|
||||
);
|
||||
AOS.Damage(attacker, this, Utility.RandomMinMax(50, 65), 100, 0, 0, 0, 0);
|
||||
}
|
||||
ThrowFan(attacker);
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
|
|
@ -158,9 +132,8 @@ namespace Server.Mobiles
|
|||
* Effect does not stack
|
||||
*/
|
||||
|
||||
defender.SendLocalizedMessage(
|
||||
1070833
|
||||
); // The creature fans you with fire, reducing your resistance to fire attacks.
|
||||
// The creature fans you with fire, reducing your resistance to fire attacks.
|
||||
defender.SendLocalizedMessage(1070833);
|
||||
|
||||
var effect = -(defender.FireResistance / 10);
|
||||
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ namespace Server.Mobiles
|
|||
30,
|
||||
5052
|
||||
);
|
||||
Effects.PlaySound(g, g.Map, 0x208);
|
||||
Effects.PlaySound(g, 0x208);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ namespace Server.Mobiles
|
|||
10,
|
||||
5044
|
||||
);
|
||||
Effects.PlaySound(g, g.Map, 0x307);
|
||||
Effects.PlaySound(g, 0x307);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ namespace Server.Mobiles
|
|||
30,
|
||||
5052
|
||||
);
|
||||
Effects.PlaySound(g, g.Map, 0x208);
|
||||
Effects.PlaySound(g, 0x208);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -700,7 +700,7 @@ namespace Server.Mobiles
|
|||
10,
|
||||
5044
|
||||
);
|
||||
Effects.PlaySound(g, g.Map, 0x307);
|
||||
Effects.PlaySound(g, 0x307);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue