Fixes dictionary uses (#7)
This commit is contained in:
parent
d4a52344f2
commit
916d404c51
161 changed files with 1211 additions and 1722 deletions
|
|
@ -167,39 +167,37 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
{
|
||||
/* Grasping Claw
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
if (m_Table.TryGetValue(defender, out ExpireTimer timer))
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
|
|||
|
|
@ -161,39 +161,37 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
{
|
||||
/* Grasping Claw
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
if (m_Table.TryGetValue(defender, out ExpireTimer timer))
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue