GameFramework.EntityInfo.GetCampId C# (CSharp) Method

GetCampId() public method

public GetCampId ( ) : int
return int
        public int GetCampId()
        {
            return m_CampId;
        }

Usage Example

        public static Msg_RC_CreateNpc BuildCreateNpcMessage(EntityInfo npc, int rate = -1)
        {
            Msg_RC_CreateNpc bder = new Msg_RC_CreateNpc();

            bder.npc_id  = npc.GetId();
            bder.unit_id = npc.GetUnitId();
            ScriptRuntime.Vector3         pos    = npc.GetMovementStateInfo().GetPosition3D();
            GameFrameworkMessage.Position pos_bd = new GameFrameworkMessage.Position();
            pos_bd.x            = (float)pos.X;
            pos_bd.z            = (float)pos.Z;
            bder.cur_pos        = pos_bd;
            bder.face_direction = (float)npc.GetMovementStateInfo().GetFaceDir();
            bder.link_id        = npc.GetTableId();
            bder.camp_id        = npc.GetCampId();
            if (npc.OwnerId > 0)
            {
                bder.owner_id = npc.OwnerId;
            }
            if (npc.GetAiStateInfo().LeaderId > 0)
            {
                bder.leader_id = npc.GetAiStateInfo().LeaderId;
            }
            User user = npc.CustomData as User;

            if (null != user)
            {
                bder.key = user.GetKey();
            }
            bder.level = npc.Level;

            return(bder);
        }
All Usage Examples Of GameFramework.EntityInfo::GetCampId