Return the cached PromotionClass from GET_PROMOTION_CLASS
Character load and the promotion trainer re-read static_rune_promotion on every call and replaced the cached object. They now get the object loaded at boot, as GET_BASE_CLASS already does; the DB query is only a miss fallback. No value changes: the cached and re-read objects hold the same row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8c322a3f5
commit
992177eb0c
1 file changed
+9
-1
@@ -50,7 +50,15 @@ public class dbPromotionClassHandler extends dbHandlerBase {
|
||||
|
||||
public PromotionClass GET_PROMOTION_CLASS(final int objectUUID) {
|
||||
|
||||
PromotionClass promotionClass = null;
|
||||
PromotionClass promotionClass;
|
||||
|
||||
if (objectUUID == 0)
|
||||
return null;
|
||||
|
||||
promotionClass = (PromotionClass) DbManager.getFromCache(mbEnums.GameObjectType.PromotionClass, objectUUID);
|
||||
|
||||
if (promotionClass != null)
|
||||
return promotionClass;
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_rune_promotion` WHERE `ID` = ?")) {
|
||||
|
||||
Reference in new issue
Block a user