Prison Priest only revives User (#1215) – ReyarB
The Prison Priest now only revives the corresponding user (User#1215 – ReyarB).
It does not modify any other status or affect other characters.
Refactor unused parameters (#1195) – Centorios
Removed the MapNumber parameter from UserDisconnected.
Added explicit Integer typing to the UserConnected parameter.
Updated the SaveUser call to match the new UserDisconnected signature (now only receives UserIndex).
This simplifies the user connection/disconnection interfaces and ensures consistent parameter types.
Item damage in combat against NPCs (#1190) – aledg994
Added support for NPC-specific damage ranges using new item properties:
MinHitToNPC
MaxHitToNPC
Weapons and ammunition can now define an alternative damage range that applies only when the target is an NPC, while maintaining the current behavior against users.
Technical changes
GetUserDamage now receives the target type (TargetType).
GetUserDamageWithItem incorporates differentiated logic based on the target.
All calls to GetUserDamageWithItem were updated accordingly.
Added helper GetHitRangeValues, which:
Uses MinHitToNPC / MaxHitToNPC when the target is an NPC.
Allows partial overrides (min only or max only).
Validates invalid ranges (MaxHit < MinHit).
Applies to both weapons and ammunition.
If a weapon or ammunition does not define MinHitToNPC and/or MaxHitToNPC, traditional values are used automatically.
Refactor SaveCharacterDB into orchestration + focused DB helpers (#1218) – Morgolock
SaveCharacterDB was converted into an orchestrator while preserving:
Original login validation
PerformanceTestStart timing
Call order
Invocation of SaveCharacterQuestsDB
InitUserPersistSnapshot
LogSaveCharacterDuration
Original error handler text
Database operations were extracted into private helpers:
SaveCharacterMainDB
SaveCharacterSpellsDB
SaveCharacterInventoryDB
SaveCharacterBankInventoryDB
SaveCharacterSkillsDB
SaveCharacterPetsDB
SaveCharacterQuestsDoneDB
SaveCharacterInventorySkinsDB
Each helper:
Receives ByRef parameters
Follows the GetTickCountRaw + Execute + AppendQueryDuration pattern
Preserves the original timing labels
Parameter order and SQL constants were preserved (no query strings were modified), as well as the exact pet-type selection logic and quest builder/cleanup behavior.
SaveInventorySkins was encapsulated within SaveCharacterInventorySkinsDB to keep the "save inventory skins" timing label unchanged.
Stop updating immutable identity fields on character save (#1219) – Morgolock
Removed name = ?, genre_id = ?, race_id = ?, and class_id = ? from the QUERY_UPDATE_MAINPJ builder in Codigo/Database_Queries.bas, so UPDATE user SET ... WHERE id = ? no longer modifies identity fields.
Also:
Removed packing of corresponding VB parameters from:
SaveCharacterMainDB
SaveChangesInUser
Adjusted ReDim Params from 65 to 61 to match the new placeholder count.
Added Debug.Assert i = UBound(Params) + 1 immediately before Execute(QUERY_UPDATE_MAINPJ, Params) in both save paths to detect future mismatches between SQL placeholders and packed parameters.
New DisabledInBattleServer flag for NPCs (#1223, #1224) – Temis-gt
Introduces a new NPC configuration field: DisabledInBattleServer As Integer.
Configuration
Read from config file:
DisabledInBattleServer = Val(LeerNPCs.GetValue(SectionName, "DISABLEDINBATTLESERVER"))
Conditional check in BattleServer mode:
#If BATTLESERVER = 1 Then
If Info.DisabledInBattleServer > 0 Then Exit Function
#End If
Impact
Normal servers (BattleServer = 0): No changes. All NPCs load normally.
BattleServer (BattleServer = 1): NPCs with DisabledInBattleServer = 1 are not loaded or listed.
This prevents irrelevant or restricted NPCs from appearing in BattleServer mode and maintains gameplay consistency.
Fix: Net fishing not allowed from the shore (#1226) – ReyarB
Fixed a bug that allowed fishing nets to be used from the shore when it should not have been possible.
Hit Probability Limit Adjustment (5%–95%) (#1203) – Temis-gt
The hit probability calculation in combat (against both NPCs and players) has been adjusted.
Before:
Minimum 10% – Maximum 90%
Now:
Minimum 5% – Maximum 95%
This adjustment smooths extreme cases:
In extreme disadvantage situations, a minimum 5% chance is allowed (instead of 10%), keeping the possibility of a lucky hit.
In extreme advantage situations, the cap is raised to 95% (instead of 90%), slightly reducing misses when the attacker has a clear advantage.
This change only affects extreme cases and does not modify intermediate values, preserving overall combat balance.

