Misc. fixes
This commit is contained in:
@@ -757,7 +757,7 @@ namespace Game.Chat
|
||||
if (!result.IsEmpty())
|
||||
{
|
||||
string country = result.Read<string>(0);
|
||||
stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_ACCOUNT_LOCK_CONTRY);
|
||||
stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_ACCOUNT_LOCK_COUNTRY);
|
||||
stmt.AddValue(0, country);
|
||||
stmt.AddValue(1, handler.GetSession().GetAccountId());
|
||||
DB.Login.Execute(stmt);
|
||||
@@ -771,7 +771,7 @@ namespace Game.Chat
|
||||
}
|
||||
else if (param == "off")
|
||||
{
|
||||
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_ACCOUNT_LOCK_CONTRY);
|
||||
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_ACCOUNT_LOCK_COUNTRY);
|
||||
stmt.AddValue(0, "00");
|
||||
stmt.AddValue(1, handler.GetSession().GetAccountId());
|
||||
DB.Login.Execute(stmt);
|
||||
|
||||
@@ -1754,14 +1754,17 @@ namespace Game.DataStorage
|
||||
areaEntry = CliDB.AreaTableStorage.LookupByKey(areaEntry.ParentAreaID);
|
||||
}
|
||||
|
||||
MapRecord mapEntry = CliDB.MapStorage.LookupByKey(mapId);
|
||||
if (mapEntry != null)
|
||||
if (mapId > 0)
|
||||
{
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], (int)mapEntry.Id);
|
||||
if (mapEntry.ParentMapID >= 0)
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], mapEntry.ParentMapID);
|
||||
if (mapEntry.CosmeticParentMapID >= 0)
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], mapEntry.CosmeticParentMapID);
|
||||
MapRecord mapEntry = CliDB.MapStorage.LookupByKey(mapId);
|
||||
if (mapEntry != null)
|
||||
{
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], (int)mapEntry.Id);
|
||||
if (mapEntry.ParentMapID >= 0)
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], mapEntry.ParentMapID);
|
||||
if (mapEntry.CosmeticParentMapID >= 0)
|
||||
iterateUiMapAssignments(_uiMapAssignmentByMap[(int)system], mapEntry.CosmeticParentMapID);
|
||||
}
|
||||
}
|
||||
|
||||
return nearestMapAssignment.UiMapAssignment;
|
||||
|
||||
@@ -1504,7 +1504,7 @@ namespace Game.DungeonFinding
|
||||
else if (dungeon.expansion > (uint)expansion)
|
||||
lockStatus = LfgLockStatusType.InsufficientExpansion;
|
||||
else if (Global.DisableMgr.IsDisabledFor(DisableType.Map, dungeon.map, player))
|
||||
lockStatus = LfgLockStatusType.RaidLocked;
|
||||
lockStatus = LfgLockStatusType.NotInSeason;
|
||||
else if (Global.DisableMgr.IsDisabledFor(DisableType.LFGMap, dungeon.map, player))
|
||||
lockStatus = LfgLockStatusType.RaidLocked;
|
||||
else if (dungeon.difficulty > Difficulty.Normal && player.GetBoundInstance(dungeon.map, dungeon.difficulty) != null)
|
||||
|
||||
@@ -544,7 +544,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// Check if angular distance changed
|
||||
bool turn = MathFunctions.fuzzyGt(Math.PI - Math.Abs(Math.Abs(GetOrientation() - orientation) - Math.PI), 0.0f);
|
||||
bool turn = MathFunctions.fuzzyGt((float)Math.PI - Math.Abs(Math.Abs(GetOrientation() - orientation) - (float)Math.PI), 0.0f);
|
||||
// G3D::fuzzyEq won't help here, in some cases magnitudes differ by a little more than G3D::eps, but should be considered equal
|
||||
bool relocated = (teleport ||
|
||||
Math.Abs(GetPositionX() - x) > 0.001f ||
|
||||
|
||||
Reference in New Issue
Block a user