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.

Remount Delay Does Not Apply to Animal Form

MB

Knight
The ninjitsu spell Animal Form should be subjected to the 10 second remount penalty after a player is dismounted or knocked out of animal form by a bola or weapon attack.

Currently, any time someone is dismounted via bola or weapon special, there is a 10 second delay before either the attacker or victim can remount. A recent change correctly gave us the ability to treat players in animal form as mounted and bolas and attacks could knock them out of animal form into human. The problem is the 10 second remount delay is not in effect for the animal form spell and the player can instantly go back into ostard/llama/bullfrog and run away while the attacker is stuck on foot for 10 seconds.
 

MB

Knight
So in PlayerMobile.cs, we have the BlockMountTypes
Code:
    public enum BlockMountType
    {
        None = -1,
        Dazed = 1040024,
        BolaRecovery = 1062910,
        DismountRecovery = 1070859
    }

When you are bolad or dismounted, the attacker and victim are assigned one of these. In Bola.cs, there is this line putting the target in a 10 second timeout of dazed.
Code:
(to as PlayerMobile).SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds( Core.ML ? 10 : 3 ), true);

followed by one for the thrower of the bola into BolaRecovery
Code:
(from as PlayerMobile).SetMountBlock( BlockMountType.BolaRecovery, TimeSpan.FromSeconds( Core.ML ? 10 : 3 ), true );

When you go to mount your pet, a check is performed via BaseMount.cs and if you are in one of the BlockMountType categories, it sends the appropriate ciloc message and gives you a false for being able to mount.
Code:
      public static bool CheckMountAllowed( Mobile mob )
        {
            bool result = true;
 
            if ((mob is PlayerMobile) && (mob as PlayerMobile).MountBlockReason != BlockMountType.None)
            {
                mob.SendLocalizedMessage((int)(mob as PlayerMobile).MountBlockReason);
 
                result = false;
            }
 
            return result;
        }

The issue is this check is not performed when perfoming AnimalForm.cs. By adding the following lines at Ln123 under OnCast() right before the SkipGump boolean and a } before the 'else' before 'DoFizzle', someone who is under a 10 second remount penalty from a bola or dismount will not be able to go into animal form.
Code:
if ((Caster as PlayerMobile).MountBlockReason != BlockMountType.None)
                    {
                        Caster.SendLocalizedMessage(1063108); // You cannot use this ability right now.
                    }
                    else
                    {

I don't know what the OSI cliloc is, perhaps another would be a better fit. If were to make the cliloc line as follows:
Code:
Caster.SendLocalizedMessage((int)(Caster as PlayerMobile).MountBlockReason);
Then, when trying to animal form:
* after being dismounted: "You are still too dazed from being knocked off your mount to ride!"
* after using dismount on someone: "You cannot mount while recovering from a dismount special maneuver."
* after being bolad: "You are still too dazed from being knocked off your mount to ride!"
* after throwing bola: "You cannot mount while recovering from a bola throw."

Use of these terms will need to consider whether animal form is considered riding or mounting. The easiest resolution is a report as to OSI messages.


The final AnimalForm.cs using this suggestion is attached.
 

Attachments

  • AnimalForm.rar
    5.1 KB · Views: 5
Top