private void OnNpcTargetChange(NpcInfo npc) { Scene scene = npc.SceneContext.CustomData as Scene; if (null != scene) { Msg_RC_NpcTarget npcTargetBuilder = DataSyncUtility.BuildNpcTargetMessage(npc); if (null != npcTargetBuilder) { scene.NotifyAreaUser(npc, npcTargetBuilder); } } }
private void NpcEnterCampSight(NpcInfo npc, int campid) { Msg_RC_NpcEnter bder = DataSyncUtility.BuildNpcEnterMessage(npc); NotifyCampUsers(campid, bder); Msg_RC_SyncProperty propBuilder = DataSyncUtility.BuildSyncPropertyMessage(npc); NotifyCampUsers(campid, propBuilder); Msg_RC_NpcMove npcMoveBuilder = DataSyncUtility.BuildNpcMoveMessage(npc); NotifyCampUsers(campid, npcMoveBuilder); Msg_RC_NpcTarget npcFaceTargetBuilder = DataSyncUtility.BuildNpcTargetMessage(npc); if (npcFaceTargetBuilder != null) { NotifyCampUsers(campid, npcFaceTargetBuilder); } }