Gisela
Bug Hunter
[COMPLETE] Some spells report the wrong mana requirements
Type: Broken Feature
Basic Description: Some spells report required mana without accounting for LMC.
Way to experience: Cast a Chivalry, Bushido or Ninjitsu spell while out of mana. Note that the required mana message will be exactly what the requirement is without LMC.
Code:
Type: Broken Feature
Basic Description: Some spells report required mana without accounting for LMC.
Way to experience: Cast a Chivalry, Bushido or Ninjitsu spell while out of mana. Note that the required mana message will be exactly what the requirement is without LMC.
Code:
Code:
Index: Scripts/Spells/Chivalry/PaladinSpell.cs
===================================================================
--- Scripts/Spells/Chivalry/PaladinSpell.cs (revision 321)
+++ Scripts/Spells/Chivalry/PaladinSpell.cs (working copy)
@@ -26,6 +26,8 @@
public override bool CheckCast()
{
+ int mana = ScaleMana( RequiredMana );
+
if ( !base.CheckCast() )
return false;
@@ -39,9 +41,9 @@
Caster.SendLocalizedMessage( 1060173, RequiredTithing.ToString() ); // You must have at least ~1_TITHE_REQUIREMENT~ Tithing Points to use this ability,
return false;
}
- else if ( Caster.Mana < ScaleMana( RequiredMana ) )
+ else if ( Caster.Mana < mana )
{
- Caster.SendLocalizedMessage( 1060174, RequiredMana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
+ Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
@@ -69,7 +71,7 @@
}
else if ( Caster.Mana < mana )
{
- Caster.SendLocalizedMessage( 1060174, RequiredMana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
+ Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
Index: Scripts/Spells/Bushido/SamuraiSpell.cs
===================================================================
--- Scripts/Spells/Bushido/SamuraiSpell.cs (revision 321)
+++ Scripts/Spells/Bushido/SamuraiSpell.cs (working copy)
@@ -41,6 +41,8 @@
public override bool CheckCast()
{
+ int mana = ScaleMana ( RequiredMana );
+
if ( !base.CheckCast() )
return false;
@@ -56,9 +58,9 @@
Caster.SendLocalizedMessage( 1063013, args ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
return false;
}
- else if ( Caster.Mana < ScaleMana( RequiredMana ) )
+ else if ( Caster.Mana < mana )
{
- Caster.SendLocalizedMessage( 1060174, RequiredMana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
+ Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
Index: Scripts/Spells/Ninjitsu/NinjaSpell.cs
===================================================================
--- Scripts/Spells/Ninjitsu/NinjaSpell.cs (revision 321)
+++ Scripts/Spells/Ninjitsu/NinjaSpell.cs (working copy)
@@ -43,6 +43,8 @@
public override bool CheckCast()
{
+ int mana = ScaleMana( RequiredMana );
+
if ( !base.CheckCast() )
return false;
@@ -58,9 +60,9 @@
Caster.SendLocalizedMessage( 1063013, args ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
return false;
}
- else if ( Caster.Mana < ScaleMana( RequiredMana ) )
+ else if ( Caster.Mana < mana )
{
- Caster.SendLocalizedMessage( 1060174, RequiredMana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
+ Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}