UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[COMPLETE] Some spells report the wrong mana requirements

Status
Not open for further replies.

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:

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;
             }
 

Attachments

  • correctly_report_cast_requirements.txt
    3.3 KB · Views: 3
Re: [TESTING] Some spells report the wrong mana requirements

Logs created by TortoiseSVN tell this patch was implemented with revision 332.
 
Status
Not open for further replies.
Top