public static Msg_RC_NpcStopSkill BuildNpcStopSkillMessage(EntityInfo obj) { Msg_RC_NpcStopSkill msg = new Msg_RC_NpcStopSkill(); msg.npc_id = obj.GetId(); return(msg); }
internal static void Execute(object msg, NetConnection conn) { Msg_RC_NpcStopSkill targetmsg = msg as Msg_RC_NpcStopSkill; if (null == targetmsg) { return; } EntityInfo npc = PluginFramework.Instance.GetEntityById(targetmsg.npc_id); if (null == npc) { return; } GfxSkillSystem.Instance.StopAllSkill(npc.GetId(), true); }
private void OnAiStopSkill(EntityInfo npc) { Scene scene = npc.SceneContext.CustomData as Scene; if (null != scene) { SkillInfo skillInfo = npc.GetSkillStateInfo().GetCurSkillInfo(); if (null == skillInfo || skillInfo.IsSkillActivated) { scene.SkillSystem.StopAllSkill(npc.GetId(), true); } Msg_RC_NpcStopSkill skillBuilder = DataSyncUtility.BuildNpcStopSkillMessage(npc); LogSystem.Info("Send Msg_RC_NpcStopSkill, EntityId={0}", npc.GetId()); scene.NotifyAllUser(RoomMessageDefine.Msg_RC_NpcStopSkill, skillBuilder); } }
public static void Execute(object msg, User user) { Msg_CR_StopSkill stopMsg = msg as Msg_CR_StopSkill; if (null == stopMsg) { return; } EntityInfo userInfo = user.Info; if (null == userInfo) { return; } Scene scene = user.OwnRoomUserManager.ActiveScene; if (null != scene) { Msg_RC_NpcStopSkill retMsg = DataSyncUtility.BuildNpcStopSkillMessage(userInfo); scene.NotifyAllUser(RoomMessageDefine.Msg_RC_NpcStopSkill, retMsg); } }
internal static void Execute(object msg, User user) { Msg_CR_StopSkill stopMsg = msg as Msg_CR_StopSkill; if (null == stopMsg) { return; } EntityInfo userInfo = user.Info; if (null == userInfo) { return; } Scene scene = user.OwnRoom.ActiveScene; if (null != scene) { scene.SkillSystem.StopAllSkill(userInfo.GetId(), true); Msg_RC_NpcStopSkill retMsg = DataSyncUtility.BuildNpcStopSkillMessage(userInfo); scene.NotifyAllUser(RoomMessageDefine.Msg_RC_NpcStopSkill, retMsg); } }