FIXED Possible dryad(and related) bug

Anthar

Novice III
Supporter
While i am yet to find how often this undress is to happen from what i noticed you have almost 100% chance to be constantly claimed and "undressed as a male".

I fought multiple dryads recently , including on multiple chars and as i moved them to area with dryads all of them got almost instantly claimed and undressed (males).

Polymorphing a male into a female did not also solve the undress issue as i still got constantly undressed - while this should not happen to 'female' now character.


Can someone compare this two elements on 'production' current behaviour does not make any sense as fighting those mobs is highly annoying and in bigger mob numbers @#$#$@!@#$$%!@# !!!!!!
 

RedBeard

Journeyman II
The Legend
Benefactor
Supporter
Doesn't check for Polymorph (IsBodyMod)
Code:
 #region Undress
        private DateTime m_NextUndress;

        public void AreaUndress()
        {
            if (Combatant == null || Deleted || !Alive || m_NextUndress > DateTime.UtcNow || 0.05 < Utility.RandomDouble())
                return;

            IPooledEnumerable eable = GetMobilesInRange(RangePerception);

            foreach (Mobile m in eable)
            {
                if (m != null && m.Player && !m.Female && !m.Hidden && m.IsPlayer() && CanBeHarmful(m))
                {
                    UndressItem(m, Layer.OuterTorso);
                    UndressItem(m, Layer.InnerTorso);
                    UndressItem(m, Layer.MiddleTorso);
                    UndressItem(m, Layer.Pants);
                    UndressItem(m, Layer.Shirt);

                    m.SendLocalizedMessage(1072197); // The dryad's beauty makes your blood race. Your clothing is too confining.
                }
            }
            eable.Free();

            m_NextUndress = DateTime.UtcNow + TimeSpan.FromMinutes(1);
        }

From Semidar.cs
Code:
 public override void CheckReflect(Mobile caster, ref bool reflect)
        {
            if (!caster.Female && !caster.IsBodyMod)
                reflect = true; // Always reflect if caster isn't female
        }
 
OP
A

Anthar

Novice III
Supporter
<0.05 chance for undress?
....no way
... should it not look like this?
If the retry timer is set current way , it wil basically loop "instantly" until it succeed and only then 1 minute delay will be set:
public void AreaUndress(
if (m_NextUndress > DateTime.UtcNow )
return;

m_NextUndress = DateTime.UtcNow + TimeSpan.FromMinutes(1);

if (Combatant == null || Deleted || !Alive || 0.05 < Utility.RandomDouble())
return;

IPooledEnumerable eable = GetMobilesInRange(RangePerception);
foreach (Mobile m in eable)
{
if (m != null && m.Player && !m.Female && !m.Hidden && m.IsPlayer() && CanBeHarmful(m)) 'body mod missing here
{
UndressItem(m, Layer.OuterTorso);
UndressItem(m, Layer.InnerTorso);
UndressItem(m, Layer.MiddleTorso);
UndressItem(m, Layer.Pants);
UndressItem(m, Layer.Shirt);
m.SendLocalizedMessage(1072197); // The dryad's beauty makes your blood race. Your clothing is too confining.
}
}
eable.Free();
}
I wonder if the same with area claim, as it is almost always there.
 
Last edited:

adverserath

Novice III
C# Nerd
Supporter
Can fix the male body check.
I need to check timers in OSI, because trying once per minute with 5% chance sounds too low. Maybe it should only try to peace every second? or its a standard skill timer for 10 seconds?
 
OP
A

Anthar

Novice III
Supporter
again the timer is badly set in the function.
quite probably the same is for area peace.

Look at the initial code.
Timer is set in the success condition, thus when it is not set or expired it will loop without delay until it succeeds.

Exact problem with dryads now - the bugs i see :
1. You are getting constantly undressed - retry timer is set in wrong place.
2. You are constantly calmed - i assume timer is set in similar way, explaining the issue.
3. You are undressed even if polymorphed to female - lack of condition.

As for the % chance, no way to tell what chance is on OSI, but with how the conditions are constructed atm, practically on our shard there is always 100% chance with some extra loops happening.
If you remove the || 0.05 < Utility.RandomDouble() part ... nothing will change in behavior for end user.
 

adverserath

Novice III
C# Nerd
Supporter
Testing on OSI:
- Dryads actually have 2 peace modes, seemingly with 50% chance of either
* "You gaze upon the dryad's beauty and are momentarily distracted" - lasts 3 seconds
* "You gaze upon the dryad's beauty and forget to continue battling" - lasts 20 seconds
Suggestion: Add second peace option in

-Being peaced doesnt disable war mode
Suggestion: Fix that

- I can stand near them for 10 seconds in battle without being peaced
Suggestion: Limit the peace attempt to once per second

- Over 10 dryad battles have happened, I lost my clothes once
Suggestion: Limit the undress attempt to once per minute. That way when there are multiple dryad theres a higher chance of undress, but its not unplayable.

Things I still need to test:
- Does undress affect everyone in the area at once or is the check player specific?
- Does peace affect everyone in the area at once or is the check player specific?
 

PLAY NOW

Heritage

Address
play.trueuo.com
Port
2593
Uptime
7 hours
Players Online
17
Houses
852
Vendors
297
Gold
5,019,541,935gp
Top Bottom