Core/Misc: Reduce differences between cores
Port From (https://github.com/TrinityCore/TrinityCore/commit/ff6a107ac0e7a82d728f8fd2fd8423743233a474)
This commit is contained in:
@@ -5061,7 +5061,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
// Do not allow polearm to be equipped in the offhand (rare case for the only 1h polearm 41750)
|
// Do not allow polearm to be equipped in the offhand (rare case for the only 1h polearm 41750)
|
||||||
if (type == InventoryType.Weapon && pProto.GetSubClass() == (uint)ItemSubClassWeapon.Polearm)
|
if (type == InventoryType.Weapon && pProto.GetSubClass() == (uint)ItemSubClassWeapon.Polearm)
|
||||||
return InventoryResult.TwoHandSkillNotFound;
|
return InventoryResult.WrongSlot;
|
||||||
else if (type == InventoryType.Weapon)
|
else if (type == InventoryType.Weapon)
|
||||||
{
|
{
|
||||||
if (!CanDualWield())
|
if (!CanDualWield())
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ namespace Game.Entities
|
|||||||
SetInventorySlotCount(InventorySlots.DefaultSize);
|
SetInventorySlotCount(InventorySlots.DefaultSize);
|
||||||
|
|
||||||
// set starting level
|
// set starting level
|
||||||
SetLevel(GetStartLevel(createInfo.RaceId, createInfo.ClassId, createInfo.TemplateSet));
|
SetLevel(GetStartLevel(createInfo.RaceId, createInfo.ClassId, createInfo.TemplateSet), false);
|
||||||
|
|
||||||
InitRunes();
|
InitRunes();
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ namespace Game
|
|||||||
packet.MapID = (int)corpseMapID;
|
packet.MapID = (int)corpseMapID;
|
||||||
packet.ActualMapID = (int)mapID;
|
packet.ActualMapID = (int)mapID;
|
||||||
packet.Position = new Vector3(x, y, z);
|
packet.Position = new Vector3(x, y, z);
|
||||||
packet.Transport = ObjectGuid.Empty;
|
packet.Transport = ObjectGuid.Empty; // TODO: If corpse is on transport, send transport offsets and transport guid
|
||||||
SendPacket(packet);
|
SendPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,13 +240,17 @@ namespace Game
|
|||||||
response.Player = queryCorpseTransport.Player;
|
response.Player = queryCorpseTransport.Player;
|
||||||
|
|
||||||
Player player = Global.ObjAccessor.FindConnectedPlayer(queryCorpseTransport.Player);
|
Player player = Global.ObjAccessor.FindConnectedPlayer(queryCorpseTransport.Player);
|
||||||
if (player != null)
|
if (player != null && _player.IsInSameRaidWith(player))
|
||||||
{
|
{
|
||||||
Corpse corpse = player.GetCorpse();
|
Corpse corpse = _player.GetCorpse();
|
||||||
if (_player.IsInSameRaidWith(player) && corpse != null && !corpse.GetTransGUID().IsEmpty() && corpse.GetTransGUID() == queryCorpseTransport.Transport)
|
if (corpse != null)
|
||||||
{
|
{
|
||||||
response.Position = new Vector3(corpse.GetTransOffsetX(), corpse.GetTransOffsetY(), corpse.GetTransOffsetZ());
|
Transport transport = (Transport)corpse.GetTransport();
|
||||||
response.Facing = corpse.GetTransOffsetO();
|
if (transport != null && transport.GetGUID() == queryCorpseTransport.Transport)
|
||||||
|
{
|
||||||
|
response.Position = transport.GetPosition();
|
||||||
|
response.Facing = transport.GetOrientation();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -405,6 +405,17 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CanPeriodicTickCrit()
|
||||||
|
{
|
||||||
|
if (GetSpellInfo().HasAttribute(SpellAttr2.CantCrit))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (GetSpellInfo().HasAttribute(SpellAttr8.PeriodicCanCrit))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
// unload scripts
|
// unload scripts
|
||||||
|
|||||||
@@ -5667,20 +5667,9 @@ namespace Game.Spells
|
|||||||
caster.SendSpellNonMeleeDamageLog(damageInfo);
|
caster.SendSpellNonMeleeDamageLog(damageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CanPeriodicTickCrit()
|
|
||||||
{
|
|
||||||
if (GetSpellInfo().HasAttribute(SpellAttr2.CantCrit))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (GetSpellInfo().HasAttribute(SpellAttr8.PeriodicCanCrit))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
float CalcPeriodicCritChance(Unit caster)
|
float CalcPeriodicCritChance(Unit caster)
|
||||||
{
|
{
|
||||||
if (caster == null || !CanPeriodicTickCrit())
|
if (caster == null || !GetBase().CanPeriodicTickCrit())
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
Player modOwner = caster.GetSpellModOwner();
|
Player modOwner = caster.GetSpellModOwner();
|
||||||
|
|||||||
Reference in New Issue
Block a user