Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Fixed Young Status Not removing off characters.

Fixed Wrong Order DFN Tags in ssection.h
  • Loading branch information
DragonSlayer62 committed Feb 1, 2025
1 parent a967481 commit 73a8223
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
13 changes: 13 additions & 0 deletions data/js/player/young_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,19 @@ function RevokeYoungStatus( pSock, pChar, revokeReason )
pSock.SysMessage( revokeReason );
pSock.SysMessage( GetDictionaryEntry( 18704, pSock.language )); // You are no longer considered a young player of Ultima Online, and are no longer subject to the limitations and benefits of being in that caste.
pChar.account.isYoung = false;
var playerAccount = pChar.account;
for( var i = 1; i <= 7; i++ )
{
// Construct the property name, e.g., "character1", "character2", etc.
var charKey = "character" + i;
var tempChar = playerAccount[charKey];

// Validate the character object before performing any actions
if( ValidateObject( tempChar ))
{
tempChar.RemoveScriptTrigger( 8001 );
}
}
pChar.Refresh();
}

Expand Down
4 changes: 2 additions & 2 deletions source/ssection.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ enum DFNTAGS
DFNTAG_CREATOR,
DFNTAG_CUSTOMSTRINGTAG,
DFNTAG_CUSTOMINTTAG,
DFNTAG_DURABILITYHPBONUS,
DFNTAG_DAMAGE,
DFNTAG_DAMAGEABLE,
DFNTAG_DECAY,
Expand All @@ -73,10 +72,11 @@ enum DFNTAGS
DFNTAG_DISPELLABLE,
DFNTAG_DISABLED,
DFNTAG_DOORFLAG,
DFNTAG_DEFENSECHANCE,
DFNTAG_DURABILITYHPBONUS,
DFNTAG_DYE,
DFNTAG_DYEBEARD,
DFNTAG_DYEHAIR,
DFNTAG_DEFENSECHANCE,
DFNTAG_ELEMENTRESIST,
DFNTAG_ERBONUS,
DFNTAG_EMOTECOLOUR,
Expand Down
21 changes: 10 additions & 11 deletions source/uox3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2724,26 +2724,25 @@ auto CWorldMain::CheckAutoTimers() -> void
{
auto uChar = static_cast<CChar *>( entry.first );

// Let's ensure we only do one stat window update for self per cycle,
// by skipping subsequent updates if it has already been updated
bool skipStatWindowUpdate = false;
// Let's ensure we only do one stat window update for self per cycle,
bool triggerStatWindowUpdate = false;

if( uChar->GetUpdate( UT_HITPOINTS ))
{
UpdateStats( entry.first, 0, skipStatWindowUpdate );
skipStatWindowUpdate = true;
triggerStatWindowUpdate = true;
UpdateStats( entry.first, 0, false );
}
if( uChar->GetUpdate( UT_STAMINA ))
{
UpdateStats( entry.first, 1, skipStatWindowUpdate );
skipStatWindowUpdate = true;
triggerStatWindowUpdate = true;
UpdateStats( entry.first, 1, false );
}
if( uChar->GetUpdate( UT_MANA ))
{
UpdateStats( entry.first, 2, skipStatWindowUpdate );
skipStatWindowUpdate = true;
triggerStatWindowUpdate = true;
UpdateStats( entry.first, 2, false );
}

if( uChar->GetUpdate( UT_LOCATION ))
{
uChar->Teleport();
Expand All @@ -2761,7 +2760,7 @@ auto CWorldMain::CheckAutoTimers() -> void
{
uChar->Update();
}
else if( uChar->GetUpdate( UT_STATWINDOW ) && !skipStatWindowUpdate )
else if( uChar->GetUpdate( UT_STATWINDOW ) || triggerStatWindowUpdate )
{
CSocket *uSock = uChar->GetSocket();
if( uSock )
Expand Down

0 comments on commit 73a8223

Please sign in to comment.