Misc. fixes
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.INS_REALM_CHARACTERS_INIT, "INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM realmlist, account LEFT JOIN realmcharacters ON acctid=account.id WHERE acctid IS NULL");
|
||||
PrepareStatement(LoginStatements.UPD_EXPANSION, "UPDATE account SET expansion = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_ACCOUNT_LOCK, "UPDATE account SET locked = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_ACCOUNT_LOCK_CONTRY, "UPDATE account SET lock_country = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_ACCOUNT_LOCK_COUNTRY, "UPDATE account SET lock_country = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.INS_LOG, "INSERT INTO logs (time, realm, type, level, string) VALUES (?, ?, ?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.UPD_USERNAME, "UPDATE account SET username = ?, sha_pass_hash = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_PASSWORD, "UPDATE account SET sha_pass_hash = ? WHERE id = ?");
|
||||
@@ -212,7 +212,7 @@ namespace Framework.Database
|
||||
INS_REALM_CHARACTERS_INIT,
|
||||
UPD_EXPANSION,
|
||||
UPD_ACCOUNT_LOCK,
|
||||
UPD_ACCOUNT_LOCK_CONTRY,
|
||||
UPD_ACCOUNT_LOCK_COUNTRY,
|
||||
INS_LOG,
|
||||
UPD_USERNAME,
|
||||
UPD_PASSWORD,
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `creature` WHERE `id` IN (36506) AND `guid`=85216;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=85216;
|
||||
@@ -0,0 +1,20 @@
|
||||
--
|
||||
DELETE FROM `creature` WHERE `guid` IN (252354,252359,252364,252369,252373,252378,252392,252400,252402,252404,252406,252407,252408,252409,252420,252423,252424);
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`) VALUES
|
||||
(252354, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12118.2, -1795.6, 80.2195, 0.356404, 300, 0, 0, 116235, 0),
|
||||
(252359, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12114, -1794.06, 80.3472, 3.40966, 300, 0, 0, 116235, 0),
|
||||
(252364, 52348, 859, 0, 0, "2", 169, 0, 0, -1, 0, 0, -12237.3, -1818.77, 129.414, 6.18603, 300, 0, 0, 1202925, 0),
|
||||
(252369, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12255.6, -1835.91, 131.565, 4.74561, 300, 0, 0, 116235, 0),
|
||||
(252373, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12274.2, -1838.78, 131.407, 4.938, 300, 0, 0, 116235, 0),
|
||||
(252378, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12300.7, -1806.29, 130.962, 3.08838, 300, 0, 0, 116235, 0),
|
||||
(252392, 52956, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12296.5, -1824.48, 130.262, 4.06699, 300, 0, 0, 641560, 0),
|
||||
(252400, 52088, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12297.8, -1832.84, 130.285, 2.14512, 300, 0, 0, 387450, 44540),
|
||||
(252402, 52606, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12304.5, -1827.04, 130.277, 6.01634, 300, 0, 0, 641560, 0),
|
||||
(252404, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12288.1, -1872.98, 131.44, 0.377164, 300, 0, 0, 116235, 0),
|
||||
(252406, 52606, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12333.1, -1857.21, 130.3, 0.833478, 300, 0, 0, 641560, 0),
|
||||
(252407, 52606, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12260, -1849.02, 131.455, 1.34792, 300, 0, 0, 641560, 0),
|
||||
(252408, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12118.5, -1778.3, 80.1776, 1.51967, 300, 0, 0, 116235, 0),
|
||||
(252409, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12113, -1782, 80.5676, 1.51967, 300, 0, 0, 116235, 0),
|
||||
(252420, 52089, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12124.6, -1781.83, 80.4969, 1.28405, 300, 0, 0, 116235, 0),
|
||||
(252423, 52079, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12296.1, -1897.87, 130.282, 2.0919, 300, 0, 0, 619920, 0),
|
||||
(252424, 52079, 859, 0, 0, "2", 169, 0, 0, -1, 0, 1, -12290.8, -1893.57, 130.339, 2.11089, 300, 0, 0, 619920, 0);
|
||||
Reference in New Issue
Block a user