fix: Fixes spell mechanics and misc bugs (#1118)
- [X] Fixes NPE from account tags. - [X] Fixes bad skill check due to missing cast to double. - [X] Fixes water elemental duration. - [X] Standardizes spell summon duration by expansion.
This commit is contained in:
parent
2ab0a0e063
commit
d6d02de296
24 changed files with 74 additions and 66 deletions
|
|
@ -76,22 +76,17 @@ namespace Server.Mobiles
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18)
|
||||
) // Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
// Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18))
|
||||
{
|
||||
attacker.BoltEffect(0);
|
||||
// 35~100 damage, unresistable, by the Ki-rin.
|
||||
attacker.Damage(
|
||||
Utility.RandomMinMax(35, 100),
|
||||
this,
|
||||
false
|
||||
); // Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player. If changed to player, without the extra bool it'd be an infinite loop
|
||||
// Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player.
|
||||
// If changed to player, without the extra bool it'd be an infinite loop
|
||||
attacker.Damage(Utility.RandomMinMax(35, 100), this, false);
|
||||
|
||||
Rider.LocalOverheadMessage(
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
1042534
|
||||
); // Your mount calls down the forces of nature on your opponent.
|
||||
// Your mount calls down the forces of nature on your opponent.
|
||||
Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1042534);
|
||||
Rider.FixedParticles(0, 0, 0, 0x13A7, EffectLayer.Waist);
|
||||
Rider.PlaySound(0xA9); // Ki-rin's whinny.
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1881,7 +1881,7 @@ namespace Server.Mobiles
|
|||
if (_summoned)
|
||||
{
|
||||
SummonEnd = reader.ReadDeltaTime();
|
||||
new UnsummonTimer(m_ControlMaster, this, SummonEnd - Core.Now).Start();
|
||||
new UnsummonTimer(this, SummonEnd - Core.Now).Start();
|
||||
}
|
||||
|
||||
ControlSlots = reader.ReadInt();
|
||||
|
|
@ -3443,7 +3443,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
new UnsummonTimer(caster, creature, duration).Start();
|
||||
new UnsummonTimer(creature, duration).Start();
|
||||
creature.SummonEnd = Core.Now + duration;
|
||||
|
||||
creature.MoveToWorld(p, caster.Map);
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
// ReSharper disable once RedundantOverriddenMember
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile player && Map == Map.Trammel && X >= 5199 && X <= 5271 && Y >= 1812 && Y <= 1865
|
||||
) // Schmendrick's cave
|
||||
// Schmendrick's cave
|
||||
if (m is PlayerMobile player && Map == Map.Trammel && X is >= 5199 and <= 5271 && Y is >= 1812 and <= 1865)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue