Store recommendation values without tapping into Nevit Hourglass task.
This commit is contained in:
@@ -337,7 +337,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
activeChar.sendMessage(player.getName() + "'s Recommend changed to " + recVal);
|
activeChar.sendMessage(player.getName() + "'s Recommend changed to " + recVal);
|
||||||
|
|
||||||
// Store player recommendations to avoid reseting them with Nevit peace zone check.
|
// Store player recommendations to avoid reseting them with Nevit peace zone check.
|
||||||
player.storeRecommendations(false);
|
player.storeRecommendationValues();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -14053,6 +14053,25 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store recommendation values without tapping into Nevit Hourglass task.
|
||||||
|
*/
|
||||||
|
public void storeRecommendationValues()
|
||||||
|
{
|
||||||
|
try (Connection con = DatabaseFactory.getConnection();
|
||||||
|
PreparedStatement ps = con.prepareStatement("REPLACE INTO character_reco_bonus (charId,rec_have,rec_left) VALUES (?,?,?)"))
|
||||||
|
{
|
||||||
|
ps.setInt(1, getObjectId());
|
||||||
|
ps.setInt(2, _recomHave);
|
||||||
|
ps.setInt(3, _recomLeft);
|
||||||
|
ps.execute();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.log(Level.SEVERE, "Could not update Recommendations for player: " + getObjectId(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void checkRecoBonusTask()
|
public void checkRecoBonusTask()
|
||||||
{
|
{
|
||||||
// Create bonus task
|
// Create bonus task
|
||||||
|
@@ -109,6 +109,6 @@ public class RequestVoteNew implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Store player recommendations to avoid reseting them with Nevit peace zone check.
|
// Store player recommendations to avoid reseting them with Nevit peace zone check.
|
||||||
target.storeRecommendations(false);
|
target.storeRecommendationValues();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user