ITLongwell / mondains-legacy

Automatically exported from code.google.com/p/mondains-legacy
0 stars 0 forks source link

Talisman of the Fey(ferret form): Stealing skill disabled #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Get the talisman and use the ferret animal form.
2.When you go to steal, you get the message "You cannot use that skill in
this form"

What is the expected output? What do you see instead?
Talisman give +10 stealing skill, but is being blocked in playermobile.cs

public SkillName[] AnimalFormRestrictedSkills{ get{ return
m_AnimalFormRestrictedSkills; } }

        private SkillName[] m_AnimalFormRestrictedSkills = new SkillName[]
        {
            SkillName.ArmsLore,SkillName.Begging,SkillName.Discordance,
SkillName.Forensics,SkillName.Inscribe, SkillName.ItemID,
SkillName.Meditation, SkillName.Peacemaking,
SkillName.Provocation, SkillName.RemoveTrap, SkillName.SpiritSpeak,
SkillName.Stealing,SkillName.TasteID
        };

        public override bool AllowSkillUse( SkillName skill )
        {
            if ( AnimalForm.UnderTransformation( this ) )
            {
                for( int i = 0; i < m_AnimalFormRestrictedSkills.Length; i++ )
                {
                    if( m_AnimalFormRestrictedSkills[i] == skill )
                    {
            SendLocalizedMessage( 1070771 ); // You cannot use that skill in this form.
                        return false;
                    }
                }
            }

            return DesignContext.Check( this );
        }

What version of the product are you using?

RunUO312 ML 47
Please provide any additional information below.
I'm sure it is just an override that needs to be added in the Animal Form
restrictions section in Playermobile.cs.
You can find this section in PlayerMobile.cs by searching for 1070771.

Thanks!
Koluch

Original issue reported on code.google.com by ShazzySh...@gmail.com on 14 Jun 2009 at 12:14

GoogleCodeExporter commented 8 years ago
This is correct i was on osi and the only animal form you can be is a ferret to 
be
able to steal any other animal form you can't steal

Original comment by uorevolu...@gmail.com on 17 Jun 2009 at 9:11

GoogleCodeExporter commented 8 years ago
Yes, I am ONLY talking about the Ferret form.

Original comment by ShazzySh...@gmail.com on 18 Jun 2009 at 10:56

GoogleCodeExporter commented 8 years ago
PlayerMobile.cs

------------------

       public override bool AllowSkillUse(SkillName skill)
        {

            if (AnimalForm.UnderTransformation(this) )
            {

                for (int i = 0; i < m_AnimalFormRestrictedSkills.Length; 
i++)
                {
                    //Fix Code Begin
                    if (SkillName.Stealing == skill && this.BodyValue == 
0x117 )
                    {
                        return true;
                    }
                    //Fix Code End
                    else if (m_AnimalFormRestrictedSkills[i] == skill)
                    {
                        SendLocalizedMessage(1070771); // You cannot use 
that skill in this form.
                        return false;
                    }

                }
            }

            return DesignContext.Check(this);
        }

It works very well now.

Original comment by mightyodhinn@gmail.com on 18 Jun 2009 at 5:12

GoogleCodeExporter commented 8 years ago
You can still still in any form with that code by doing this stay as human then 
use
skill stealing as humand dont esc target that your going to steal leave mouse 
cursor
alone click on the icon for animalform turn to what ever animal you want move 
mouse
and cursor still ready for stealing then target the item and as any animalform 
you
was able to steal the item.

Original comment by uorevolu...@gmail.com on 18 Jun 2009 at 9:34

GoogleCodeExporter commented 8 years ago
I ment On first line You can still Steal in any form

Original comment by uorevolu...@gmail.com on 18 Jun 2009 at 9:36

GoogleCodeExporter commented 8 years ago
It is not about my fix code. Without this code, you can still steal anything 
with 
your trick. It is general bug. Hmm i will think about this.

Original comment by mightyodhinn@gmail.com on 19 Jun 2009 at 2:01

GoogleCodeExporter commented 8 years ago
Fix for the exploit is as follows.....

In Stealing.cs look for the following code at approx line 208....

                else if (root is Corpse)
                {
                    m_Thief.SendLocalizedMessage(502710); // You can't steal that!
                }

Then add this after it....

                #region Talisman of the Fey (Ferret Form) Unofficial Fix
                else if (AnimalForm.UnderTransformation(m_Thief) && m_Thief.BodyValue
!= 0x117)
                {
                    m_Thief.SendLocalizedMessage(1070771); // You cannot use that
skill in this form.
                }
                #endregion

Problem solved.  You will no longer be able to use that exploit anymore.  Due to
Stealing.cs now looking at animal form upon target and not just on skill use.

Original comment by ShaiTanMalkier@gmail.com on 19 Jun 2009 at 8:57

GoogleCodeExporter commented 8 years ago
I added that section to Stealing.cs and still get the message you can not steal 
in
that form(Ferret form)Thnk there needs to be an override(just a little 
rewording) in
playermobile.cs because that statement of in ANY animal for you can not use any 
of
these skills listed.
Still thinking on this, see if I can figure it out when I get home from work :]

Koluch

Original comment by ShazzySh...@gmail.com on 29 Jun 2009 at 5:25

GoogleCodeExporter commented 8 years ago
Hello ShazzyShard,

I gave the code about PlayerMobile, existing exploit is not about my code, it 
is a 
problem that stealing.cs causes. And ShaiTanMailkier fixed it with the code 
above. 
You will have no problem when you arrange the fix with PlayerMobile which i 
give 
below.

PlayerMobile.cs

------------------

       public override bool AllowSkillUse(SkillName skill)
        {

            if (AnimalForm.UnderTransformation(this) )
            {

                for (int i = 0; i < m_AnimalFormRestrictedSkills.Length; 
i++)
                {
                    //Fix Code Begin
                    if (SkillName.Stealing == skill && this.BodyValue == 
0x117 )
                    {
                        return true;
                    }
                    //Fix Code End
                    else if (m_AnimalFormRestrictedSkills[i] == skill)
                    {
                        SendLocalizedMessage(1070771); // You cannot use 
that skill in this form.
                        return false;
                    }

                }
            }

            return DesignContext.Check(this);
        }

Original comment by mightyodhinn@gmail.com on 29 Jun 2009 at 6:37

GoogleCodeExporter commented 8 years ago
My apologies!@!!It has been a really long week and I misunderstood. Definitely 
helps
to add that to the PLAYERMOBILE.cs ACK!!!!! Thank you!!! :]

Original comment by ShazzySh...@gmail.com on 30 Jun 2009 at 11:42

GoogleCodeExporter commented 8 years ago
Fixed in SVN 48.

Original comment by gje...@gmail.com on 4 Jul 2009 at 3:41