Misc Fixes
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<OutputPath>..\Build\x64\Release\</OutputPath>
|
<OutputPath>..\Build\x64\Release\</OutputPath>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
<Compile Include="GameMath\Matrix2.cs" />
|
<Compile Include="GameMath\Matrix2.cs" />
|
||||||
<Compile Include="GameMath\Matrix3.cs" />
|
<Compile Include="GameMath\Matrix3.cs" />
|
||||||
<Compile Include="GameMath\Matrix4.cs" />
|
<Compile Include="GameMath\Matrix4.cs" />
|
||||||
<Compile Include="GameMath\QuaternionD.cs" />
|
<Compile Include="GameMath\Quaternion.cs" />
|
||||||
<Compile Include="GameMath\Ray.cs" />
|
<Compile Include="GameMath\Ray.cs" />
|
||||||
<Compile Include="Networking\SSLSocket.cs" />
|
<Compile Include="Networking\SSLSocket.cs" />
|
||||||
<Compile Include="Constants\ServiceHash.cs" />
|
<Compile Include="Constants\ServiceHash.cs" />
|
||||||
|
|||||||
@@ -284,7 +284,6 @@ namespace Game.DataStorage
|
|||||||
}
|
}
|
||||||
|
|
||||||
string str = locStr[locale];
|
string str = locStr[locale];
|
||||||
buffer.WriteUInt16(str.Length + 1);
|
|
||||||
buffer.WriteCString(str);
|
buffer.WriteCString(str);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -296,54 +295,44 @@ namespace Game.DataStorage
|
|||||||
void WriteArrayValues(object entry, FieldInfo fieldInfo, ByteBuffer buffer)
|
void WriteArrayValues(object entry, FieldInfo fieldInfo, ByteBuffer buffer)
|
||||||
{
|
{
|
||||||
var type = fieldInfo.FieldType.GetElementType();
|
var type = fieldInfo.FieldType.GetElementType();
|
||||||
var length = ((Array)fieldInfo.GetValue(entry)).Length;
|
var array = (Array)fieldInfo.GetValue(entry);
|
||||||
for (var i = 0; i < length; ++i)
|
for (var i = 0; i < array.Length; ++i)
|
||||||
{
|
{
|
||||||
var value = (Array)fieldInfo.GetValue(entry);
|
|
||||||
switch (Type.GetTypeCode(type))
|
switch (Type.GetTypeCode(type))
|
||||||
{
|
{
|
||||||
case TypeCode.Boolean:
|
case TypeCode.Boolean:
|
||||||
buffer.WriteUInt8(value.GetValue(i));
|
buffer.WriteUInt8(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.SByte:
|
case TypeCode.SByte:
|
||||||
buffer.WriteInt8(value.GetValue(i));
|
buffer.WriteInt8(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Byte:
|
case TypeCode.Byte:
|
||||||
buffer.WriteUInt8(value.GetValue(i));
|
buffer.WriteUInt8(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Int16:
|
case TypeCode.Int16:
|
||||||
buffer.WriteInt16(value.GetValue(i));
|
buffer.WriteInt16(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.UInt16:
|
case TypeCode.UInt16:
|
||||||
buffer.WriteUInt16(value.GetValue(i));
|
buffer.WriteUInt16(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Int32:
|
case TypeCode.Int32:
|
||||||
buffer.WriteInt32(value.GetValue(i));
|
buffer.WriteInt32(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.UInt32:
|
case TypeCode.UInt32:
|
||||||
buffer.WriteUInt32(value.GetValue(i));
|
buffer.WriteUInt32(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Int64:
|
case TypeCode.Int64:
|
||||||
buffer.WriteInt64(value.GetValue(i));
|
buffer.WriteInt64(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.UInt64:
|
case TypeCode.UInt64:
|
||||||
buffer.WriteUInt64(value.GetValue(i));
|
buffer.WriteUInt64(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.Single:
|
case TypeCode.Single:
|
||||||
buffer.WriteFloat(value.GetValue(i));
|
buffer.WriteFloat(array.GetValue(i));
|
||||||
break;
|
break;
|
||||||
case TypeCode.String:
|
case TypeCode.String:
|
||||||
var str = (string)value.GetValue(i);
|
var str = (string)array.GetValue(i);
|
||||||
buffer.WriteInt32(str.Length);
|
buffer.WriteCString(str);
|
||||||
buffer.WriteString(str);
|
|
||||||
break;
|
|
||||||
case TypeCode.Object:
|
|
||||||
switch (type.Name)
|
|
||||||
{
|
|
||||||
case "Unused":
|
|
||||||
buffer.WriteUInt32(0u);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace Game.DataStorage
|
|||||||
foreach (CurvePointRecord curvePoint in CliDB.CurvePointStorage.Values)
|
foreach (CurvePointRecord curvePoint in CliDB.CurvePointStorage.Values)
|
||||||
{
|
{
|
||||||
if (CliDB.CurveStorage.ContainsKey(curvePoint.CurveID))
|
if (CliDB.CurveStorage.ContainsKey(curvePoint.CurveID))
|
||||||
_curvePoints[curvePoint.CurveID].Add(curvePoint);
|
_curvePoints.Add(curvePoint.CurveID, curvePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var key in _curvePoints.Keys.ToList())
|
foreach (var key in _curvePoints.Keys.ToList())
|
||||||
|
|||||||
@@ -167,8 +167,8 @@ namespace Game.Entities
|
|||||||
if (xp != 0)
|
if (xp != 0)
|
||||||
{
|
{
|
||||||
// 4.2.2. Apply auras modifying rewarded XP (SPELL_AURA_MOD_XP_PCT and SPELL_AURA_MOD_XP_FROM_CREATURE_TYPE).
|
// 4.2.2. Apply auras modifying rewarded XP (SPELL_AURA_MOD_XP_PCT and SPELL_AURA_MOD_XP_FROM_CREATURE_TYPE).
|
||||||
xp *= (uint)player.GetTotalAuraMultiplier(AuraType.ModXpPct);
|
xp = (uint)(xp * player.GetTotalAuraMultiplier(AuraType.ModXpPct));
|
||||||
xp *= (uint)player.GetTotalAuraMultiplierByMiscValue(AuraType.ModXpFromCreatureType, (int)_victim.GetCreatureType());
|
xp = (uint)(xp * player.GetTotalAuraMultiplierByMiscValue(AuraType.ModXpFromCreatureType, (int)_victim.GetCreatureType()));
|
||||||
|
|
||||||
// 4.2.3. Give XP to player.
|
// 4.2.3. Give XP to player.
|
||||||
player.GiveXP(xp, _victim, _groupRate);
|
player.GiveXP(xp, _victim, _groupRate);
|
||||||
|
|||||||
@@ -4232,7 +4232,7 @@ namespace Game.Entities
|
|||||||
if (spellproto == null)
|
if (spellproto == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (spellproto.HasAura(GetMap().GetDifficultyID(), AuraType.ModXpPct) || !GetSession().GetCollectionMgr().CanApplyHeirloomXpBonus(item.GetEntry(), getLevel())
|
if (spellproto.HasAura(GetMap().GetDifficultyID(), AuraType.ModXpPct) && !GetSession().GetCollectionMgr().CanApplyHeirloomXpBonus(item.GetEntry(), getLevel())
|
||||||
&& Global.DB2Mgr.GetHeirloomByItemId(item.GetEntry()) != null)
|
&& Global.DB2Mgr.GetHeirloomByItemId(item.GetEntry()) != null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@@ -1484,7 +1484,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
float value = GetTotalPercentageModValue(modGroup) + GetRatingBonusValue(cr);
|
float value = GetTotalPercentageModValue(modGroup) + GetRatingBonusValue(cr);
|
||||||
// Modify crit from weapon skill and maximized defense skill of same level victim difference
|
// Modify crit from weapon skill and maximized defense skill of same level victim difference
|
||||||
value += GetMaxSkillValueForLevel() - GetMaxSkillValueForLevel() * 0.04f;
|
value += (GetMaxSkillValueForLevel() - GetMaxSkillValueForLevel()) * 0.04f;
|
||||||
|
|
||||||
if (WorldConfig.GetBoolValue(WorldCfg.StatsLimitsEnable))
|
if (WorldConfig.GetBoolValue(WorldCfg.StatsLimitsEnable))
|
||||||
value = value > WorldConfig.GetFloatValue(WorldCfg.StatsLimitsCrit) ? WorldConfig.GetFloatValue(WorldCfg.StatsLimitsCrit) : value;
|
value = value > WorldConfig.GetFloatValue(WorldCfg.StatsLimitsCrit) ? WorldConfig.GetFloatValue(WorldCfg.StatsLimitsCrit) : value;
|
||||||
|
|||||||
@@ -1124,6 +1124,7 @@ namespace Game.Scripting
|
|||||||
case AuraScriptHookType.EffectAbsorb:
|
case AuraScriptHookType.EffectAbsorb:
|
||||||
case AuraScriptHookType.EffectSplit:
|
case AuraScriptHookType.EffectSplit:
|
||||||
case AuraScriptHookType.PrepareProc:
|
case AuraScriptHookType.PrepareProc:
|
||||||
|
case AuraScriptHookType.Proc:
|
||||||
case AuraScriptHookType.EffectProc:
|
case AuraScriptHookType.EffectProc:
|
||||||
return m_defaultActionPrevented;
|
return m_defaultActionPrevented;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -956,7 +956,7 @@ namespace Game.Spells
|
|||||||
{
|
{
|
||||||
Creature targetCreature = unitTarget.ToCreature();
|
Creature targetCreature = unitTarget.ToCreature();
|
||||||
if (targetCreature != null)
|
if (targetCreature != null)
|
||||||
if (targetCreature.hasLootRecipient() && targetCreature.isTappedBy(caster.ToPlayer()))
|
if (targetCreature.hasLootRecipient() && !targetCreature.isTappedBy(caster.ToPlayer()))
|
||||||
return SpellCastResult.CantCastOnTapped;
|
return SpellCastResult.CantCastOnTapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user