Full Version : Repearing Stealing.cs from XMLSpawner Package
xmlspawner >>Troubleshooting >>Repearing Stealing.cs from XMLSpawner Package


<< Prev | Next >>

Galfaroth- 02-12-2006
I attach repaired Stealing.cs Default XMLSpawner one has bug and wasn't gaining skill. Now I added 2 gains in lines: 290, 295. The strangest thing is that noone noticed this smile.gif.

ArteGordon- 02-12-2006
those will end up checking the skill twice. The skill check has already been made before you reach that point.
Also, those will essentially remove any difficulty-based skill gain up to 100, so you will gain whenever you try to steal anything whether successful or not. That is not the way stealing works by default.

Galfaroth- 02-12-2006
But when I was stealing sth, the skill didn't work... With those checks work properly hm?

ArteGordon- 02-12-2006
what you did was to make skill gain easier by adding in another check that is basically not dependent on current skill level.
Also, that will allow skill gain even when stealing from invalid targets, so macroing attempting to steal from locked down things, or things on the ground will take you all the way to 100 without ever actually stealing a thing.

The default code will gain skill but it is difficulty based, so if you are not stealing things of the proper weight for a given skill level then you will not gain by default.

This is where the skill check occurs by default

CODE

      if ( m_Thief.CheckTargetSkill( SkillName.Stealing, toSteal, iw - 22.5, iw + 27.5 ) )
       stolen = toSteal;


and here for stackables

CODE

       if ( m_Thief.CheckTargetSkill( SkillName.Stealing, toSteal, pileWeight - 22.5, pileWeight + 27.5 ) )