Core/Players: Fixed base hit chance initialization for players
Port From (https://github.com/TrinityCore/TrinityCore/commit/1f8eddc4f0cf443c45a930bc919007541210984a)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
public partial class Player
|
public partial class Player
|
||||||
{
|
{
|
||||||
public WorldSession GetSession() { return Session; }
|
public WorldSession GetSession() { return _session; }
|
||||||
public PlayerSocial GetSocial() { return m_social; }
|
public PlayerSocial GetSocial() { return m_social; }
|
||||||
|
|
||||||
//Gossip
|
//Gossip
|
||||||
@@ -179,7 +179,7 @@ namespace Game.Entities
|
|||||||
WorldLocation _corpseLocation;
|
WorldLocation _corpseLocation;
|
||||||
|
|
||||||
//Core
|
//Core
|
||||||
WorldSession Session;
|
WorldSession _session;
|
||||||
|
|
||||||
public PlayerData m_playerData;
|
public PlayerData m_playerData;
|
||||||
public ActivePlayerData m_activePlayerData;
|
public ActivePlayerData m_activePlayerData;
|
||||||
|
|||||||
@@ -6204,7 +6204,7 @@ namespace Game.Entities
|
|||||||
public void SendLoot(Loot loot, bool aeLooting = false)
|
public void SendLoot(Loot loot, bool aeLooting = false)
|
||||||
{
|
{
|
||||||
if (!GetLootGUID().IsEmpty() && !aeLooting)
|
if (!GetLootGUID().IsEmpty() && !aeLooting)
|
||||||
Session.DoLootReleaseAll();
|
_session.DoLootReleaseAll();
|
||||||
|
|
||||||
Log.outDebug(LogFilter.Loot, $"Player::SendLoot: Player: '{GetName()}' ({GetGUID()}), Loot: {loot.GetOwnerGUID()}");
|
Log.outDebug(LogFilter.Loot, $"Player::SendLoot: Player: '{GetName()}' ({GetGUID()}), Loot: {loot.GetOwnerGUID()}");
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,11 @@ namespace Game.Entities
|
|||||||
m_playerData = new PlayerData();
|
m_playerData = new PlayerData();
|
||||||
m_activePlayerData = new ActivePlayerData();
|
m_activePlayerData = new ActivePlayerData();
|
||||||
|
|
||||||
Session = session;
|
_session = session;
|
||||||
|
|
||||||
|
ModMeleeHitChance = 7.5f;
|
||||||
|
ModRangedHitChance = 7.5f;
|
||||||
|
ModSpellHitChance = 15.0f;
|
||||||
|
|
||||||
// players always accept
|
// players always accept
|
||||||
if (!GetSession().HasPermission(RBACPermissions.CanFilterWhispers))
|
if (!GetSession().HasPermission(RBACPermissions.CanFilterWhispers))
|
||||||
@@ -809,7 +813,7 @@ namespace Game.Entities
|
|||||||
//Network
|
//Network
|
||||||
public void SendPacket(ServerPacket data)
|
public void SendPacket(ServerPacket data)
|
||||||
{
|
{
|
||||||
Session.SendPacket(data);
|
_session.SendPacket(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeclinedName GetDeclinedNames() { return _declinedname; }
|
public DeclinedName GetDeclinedNames() { return _declinedname; }
|
||||||
@@ -6383,7 +6387,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
public void SendSysMessage(string str, params object[] args)
|
public void SendSysMessage(string str, params object[] args)
|
||||||
{
|
{
|
||||||
new CommandHandler(Session).SendSysMessage(string.Format(str, args));
|
new CommandHandler(_session).SendSysMessage(string.Format(str, args));
|
||||||
}
|
}
|
||||||
public void SendBuyError(BuyResult msg, Creature creature, uint item)
|
public void SendBuyError(BuyResult msg, Creature creature, uint item)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,12 +60,9 @@ namespace Game.Entities
|
|||||||
for (byte i = 0; i < (int)WeaponAttackType.Max; ++i)
|
for (byte i = 0; i < (int)WeaponAttackType.Max; ++i)
|
||||||
m_weaponDamage[i] = new float[] { 1.0f, 2.0f };
|
m_weaponDamage[i] = new float[] { 1.0f, 2.0f };
|
||||||
|
|
||||||
if (IsTypeId(TypeId.Player))
|
ModMeleeHitChance = 0.0f;
|
||||||
{
|
ModRangedHitChance = 0.0f;
|
||||||
ModMeleeHitChance = 7.5f;
|
ModSpellHitChance = 0.0f;
|
||||||
ModRangedHitChance = 7.5f;
|
|
||||||
ModSpellHitChance = 15.0f;
|
|
||||||
}
|
|
||||||
BaseSpellCritChance = 5;
|
BaseSpellCritChance = 5;
|
||||||
|
|
||||||
for (byte i = 0; i < (int)UnitMoveType.Max; ++i)
|
for (byte i = 0; i < (int)UnitMoveType.Max; ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user