Remove the SafeMode and INVIS-D overrides from SBStringHash
The client hash (0x5547E0) has no overrides. Hashing the power id SafeMode must give the real power token for 4.8. Source types are now keyed by the effect's own token, which keeps the SafeModeA/B override in EffectsBase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aef3212b06
commit
c450af73af
2 files changed
+7
-13
No files matched your search
@@ -10,6 +10,7 @@
|
||||
package engine.db.handlers;
|
||||
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.mbEnums;
|
||||
import engine.objects.Mob;
|
||||
import engine.powers.EffectsBase;
|
||||
@@ -34,10 +35,15 @@ public class dbPowerHandler extends dbHandlerBase {
|
||||
|
||||
ResultSet rs = preparedStatement.executeQuery();
|
||||
String IDString, source;
|
||||
EffectsBase effectsBase;
|
||||
int token;
|
||||
|
||||
while (rs.next()) {
|
||||
IDString = rs.getString("IDString");
|
||||
int token = DbManager.hasher.SBStringHash(IDString);
|
||||
|
||||
// The effect's own token: INVIS-D and SafeMode send the SafeModeB/A action tokens
|
||||
effectsBase = PowersManager.getEffectByIDString(IDString);
|
||||
token = (effectsBase != null) ? effectsBase.getToken() : DbManager.hasher.SBStringHash(IDString);
|
||||
|
||||
source = rs.getString("source").replace("-", "").trim();
|
||||
mbEnums.EffectSourceType effectSourceType = mbEnums.EffectSourceType.GetEffectSourceType(source);
|
||||
|
||||
@@ -187,18 +187,6 @@ public class Hasher {
|
||||
int hash = 0;
|
||||
int shift = 0;
|
||||
|
||||
if (toHash.equals("SafeModeA"))
|
||||
return -1661750486;
|
||||
if (toHash.equals("SafeModeB"))
|
||||
return -1661751254;
|
||||
|
||||
if (toHash.equals("INVIS-D"))
|
||||
return -1661751254;
|
||||
|
||||
if (toHash.equals("SafeMode"))
|
||||
return -1661750486;
|
||||
|
||||
|
||||
if ((hashArray.length != 8 && hashArray.length != 7) || hashArray[3] != 45) {
|
||||
hash = 0;
|
||||
shift = 0;
|
||||
|
||||
Reference in new issue
Block a user