Misc fixes.
This commit is contained in:
@@ -26,6 +26,12 @@ namespace BNetServer.Networking
|
|||||||
|
|
||||||
public async override void ReadHandler(byte[] data, int receivedLength)
|
public async override void ReadHandler(byte[] data, int receivedLength)
|
||||||
{
|
{
|
||||||
|
if (receivedLength == 0)
|
||||||
|
{
|
||||||
|
CloseSocket();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var httpRequest = HttpHelper.ParseRequest(data, receivedLength);
|
var httpRequest = HttpHelper.ParseRequest(data, receivedLength);
|
||||||
if (httpRequest == null)
|
if (httpRequest == null)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2603,7 +2603,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public float GetPetChaseDistance()
|
public float GetPetChaseDistance()
|
||||||
{
|
{
|
||||||
float range = SharedConst.MeleeRange;
|
float range = 0f;
|
||||||
|
|
||||||
for (byte i = 0; i < GetPetAutoSpellSize(); ++i)
|
for (byte i = 0; i < GetPetAutoSpellSize(); ++i)
|
||||||
{
|
{
|
||||||
@@ -2614,10 +2614,8 @@ namespace Game.Entities
|
|||||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellID, GetMap().GetDifficultyID());
|
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellID, GetMap().GetDifficultyID());
|
||||||
if (spellInfo != null)
|
if (spellInfo != null)
|
||||||
{
|
{
|
||||||
if (spellInfo.GetRecoveryTime() == 0 // No cooldown
|
if (spellInfo.GetRecoveryTime() == 0 && spellInfo.RangeEntry.Id != 1 /*Self*/ && spellInfo.RangeEntry.Id != 2 /*Combat Range*/ && spellInfo.GetMaxRange() > range)
|
||||||
&& spellInfo.RangeEntry.Id != 1 /*Self*/ && spellInfo.RangeEntry.Id != 2 /*Combat Range*/
|
range = spellInfo.GetMaxRange();
|
||||||
&& spellInfo.GetMinRange() > range)
|
|
||||||
range = spellInfo.GetMinRange();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user