Misc fixes
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
using Framework.Configuration;
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ namespace Framework.Database
|
||||
fileName = @"/sql/base/characters_database.sql";
|
||||
break;
|
||||
case "WorldDatabase":
|
||||
fileName = @"/sql/TDB_full_world_820.19071_2019_07_15.sql";
|
||||
fileName = @"/sql/TDB_full_world_830.20061_2020_06_17.sql";
|
||||
break;
|
||||
case "HotfixDatabase":
|
||||
fileName = @"/sql/TDB_full_hotfixes_820.19071_2019_07_15.sql";
|
||||
fileName = @"/sql/TDB_full_hotfixes_830.20061_2020_06_17.sql";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
using Framework.Threading;
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
using System;
|
||||
|
||||
namespace Framework.Database
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlConnector;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.11.4" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="MySqlConnector" Version="0.62.0-beta4" />
|
||||
<PackageReference Include="MySqlConnector" Version="1.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -881,7 +881,7 @@ namespace Game.Chat
|
||||
handler.SendGlobalGMSysMessage("DB table `trainer` reloaded.");
|
||||
handler.SendGlobalGMSysMessage("DB table `trainer_locale` reloaded.");
|
||||
handler.SendGlobalGMSysMessage("DB table `trainer_spell` reloaded.");
|
||||
handler.SendGlobalGMSysMessage("DB table `creature_default_trainer` reloaded.");
|
||||
handler.SendGlobalGMSysMessage("DB table `creature_trainer` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,8 @@ namespace Game.Entities
|
||||
IsInWorld = true;
|
||||
ClearUpdateMask(true);
|
||||
|
||||
GetMap().GetZoneAndAreaId(_phaseShift, out m_zoneId, out m_areaId, GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
if (GetMap() != null)
|
||||
GetMap().GetZoneAndAreaId(_phaseShift, out m_zoneId, out m_areaId, GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
}
|
||||
|
||||
public virtual void RemoveFromWorld()
|
||||
|
||||
@@ -3237,7 +3237,6 @@ namespace Game.Entities
|
||||
//save, but in tavern/city
|
||||
stmt.AddValue(index++, GetTalentResetCost());
|
||||
stmt.AddValue(index++, GetTalentResetTime());
|
||||
stmt.AddValue(index++, GetNumRespecs());
|
||||
stmt.AddValue(index++, GetPrimarySpecialization());
|
||||
stmt.AddValue(index++, (ushort)m_ExtraFlags);
|
||||
stmt.AddValue(index++, m_stableSlots);
|
||||
@@ -3387,6 +3386,7 @@ namespace Game.Entities
|
||||
//save, but in tavern/city
|
||||
stmt.AddValue(index++, GetTalentResetCost());
|
||||
stmt.AddValue(index++, GetTalentResetTime());
|
||||
stmt.AddValue(index++, GetNumRespecs());
|
||||
stmt.AddValue(index++, GetPrimarySpecialization());
|
||||
stmt.AddValue(index++, (ushort)m_ExtraFlags);
|
||||
stmt.AddValue(index++, m_stableSlots);
|
||||
|
||||
@@ -5026,7 +5026,7 @@ namespace Game.Maps
|
||||
public uint LightFadeInTime;
|
||||
}
|
||||
|
||||
public struct PositionFullTerrainStatus
|
||||
public class PositionFullTerrainStatus
|
||||
{
|
||||
public struct AreaInfo
|
||||
{
|
||||
|
||||
@@ -69,14 +69,19 @@ public class PacketLog
|
||||
else
|
||||
Buffer.BlockCopy(endPoint.Address.GetAddressBytes(), 0, SocketIPBytes, 0, 16);
|
||||
|
||||
if (!isClientPacket)
|
||||
data.Combine(new byte[2]);
|
||||
int size = data.Length;
|
||||
if (isClientPacket)
|
||||
size -= 2;
|
||||
|
||||
writer.Write(data.Length + 4);
|
||||
writer.Write(size + 4);
|
||||
writer.Write(SocketIPBytes);
|
||||
writer.Write((ushort)endPoint.Port);
|
||||
writer.Write(endPoint.Port);
|
||||
writer.Write(opcode);
|
||||
writer.Write(data);
|
||||
|
||||
if (isClientPacket)
|
||||
writer.Write(data, 2, size);
|
||||
else
|
||||
writer.Write(data, 0, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace Game.Spells
|
||||
return Convert.ToBoolean(_effectMask & (1 << (int)effect));
|
||||
}
|
||||
public bool IsPositive() { return _flags.HasAnyFlag(AuraFlags.Positive); }
|
||||
bool IsSelfcasted() { return !_flags.HasAnyFlag(AuraFlags.NoCaster); }
|
||||
bool IsSelfcasted() { return _flags.HasAnyFlag(AuraFlags.NoCaster); }
|
||||
public uint GetEffectsToApply() { return _effectsToApply; }
|
||||
|
||||
public void SetRemoveMode(AuraRemoveMode mode) { _removeMode = mode; }
|
||||
|
||||
@@ -520,7 +520,7 @@ namespace Game.Spells
|
||||
|
||||
public bool IsPositiveEffect(uint effIndex)
|
||||
{
|
||||
return NegativeEffects.Get((int)effIndex);
|
||||
return !NegativeEffects.Get((int)effIndex);
|
||||
}
|
||||
|
||||
public bool IsChanneled()
|
||||
|
||||
Reference in New Issue
Block a user