fix: update normal atk.
This commit is contained in:
@@ -4,6 +4,7 @@ using CSNetwork;
|
||||
using PerfectWorld.Scripts.Managers.BrewMonster.Managers;
|
||||
using BrewMonster.Network;
|
||||
using UnityEngine.SceneManagement;
|
||||
using CSNetwork.GPDataType;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -48,5 +49,35 @@ namespace BrewMonster
|
||||
{
|
||||
EC_ManMessage.Tick();
|
||||
}
|
||||
|
||||
// Get object by specified ID
|
||||
// iAliveFlag: 0, both alive and dead; 1, must be alive; 2, must be dead
|
||||
public CECObject GetObject(int idObject, int iAliveFlag)
|
||||
{
|
||||
CECObject pObject = null;
|
||||
|
||||
if (GPDataTypeHelper.ISNPCID(idObject))
|
||||
{
|
||||
if (!(pObject = _CECNPCMan.GetNPC(idObject)))
|
||||
return null;
|
||||
|
||||
if ((iAliveFlag == 1 && (pObject as CECNPC).IsDead()) ||
|
||||
(iAliveFlag == 2 && !(pObject as CECNPC).IsDead()))
|
||||
return null;
|
||||
}
|
||||
else if (GPDataTypeHelper.ISPLAYERID(idObject))
|
||||
{
|
||||
if (!(pObject = EC_ManPlayer.GetPlayer(idObject)))
|
||||
return null;
|
||||
|
||||
if ((iAliveFlag == 1 && (pObject as EC_Player).IsDead()) ||
|
||||
(iAliveFlag == 2 && !(pObject as EC_Player).IsDead()))
|
||||
return null;
|
||||
}
|
||||
//else if (GPDataTypeHelper.ISMATTERID(idObject))
|
||||
// pObject = GetMatterMan()->GetMatter(idObject);
|
||||
|
||||
return pObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,6 +166,16 @@ namespace BrewMonster.Network
|
||||
}
|
||||
}
|
||||
|
||||
public static void c2s_CmdNPCSevHello(int nid)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdNPCSevHello(nid);
|
||||
}
|
||||
|
||||
public static void c2s_CmdNormalAttack(byte byPVPMask)
|
||||
{
|
||||
Instance._gameSession.c2s_CmdNormalAttack(byPVPMask);
|
||||
}
|
||||
|
||||
#region Task
|
||||
public static void c2s_CmdGetAllData(bool byPack, bool byEquip, bool byTask)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user