コード例 #1
0
        public override int WriteTo(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.WriteTo(Buffer, cursor);
            cursor += StatChangeInfo.WriteTo(Buffer, cursor);

            return(cursor - StartIndex);
        }
コード例 #2
0
    //public PlayerStat stats;

    public override void PerformAction()
    {
        StatChangeInfo valueChangeAction = new StatChangeInfo();

        //valueChangeAction.playerStat = stats;
        GameEventSystem.DoEvent(
            thisEvent_Type,
            valueChangeAction
            );
    }
コード例 #3
0
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            StatChangeInfo = new StatChangeInfo(Buffer, cursor);
            cursor        += StatChangeInfo.ByteLength;

            return(cursor - StartIndex);
        }
コード例 #4
0
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            StatChangeInfo = new StatChangeInfo(Buffer, cursor);
            cursor += StatChangeInfo.ByteLength;

            return cursor - StartIndex;
        }
コード例 #5
0
 public ReqStatChangeMessage(StatChangeInfo StatChangeInfo)
     : base(MessageTypeGameMode.ReqStatChange)
 {
     this.StatChangeInfo = StatChangeInfo;
 }
コード例 #6
0
        /// <summary>
        /// Constructor
        /// </summary>
        public DataController()
        {          
            // create lists
            roomObjects = new RoomObjectList(300);
            roomObjectsFiltered = new RoomObjectListFiltered(roomObjects);
            projectiles = new ProjectileList(50);
            onlinePlayers = new OnlinePlayerList(200);
            inventoryObjects = new InventoryObjectList(100);
            avatarCondition = new StatNumericList(5);
            avatarAttributes = new StatNumericList(10);
            avatarSkills = new SkillList(100);
            avatarSpells = new SkillList(100);
            avatarQuests = new SkillList(100);
            roomBuffs = new ObjectBaseList<ObjectBase>(30);
            avatarBuffs = new ObjectBaseList<ObjectBase>(30);
            spellObjects = new SpellObjectList(100);
            backgroundOverlays = new BackgroundOverlayList(5);
            playerOverlays = new ObjectBaseList<PlayerOverlay>(10);            
            chatMessages = new BaseList<ServerString>(101);
            gameMessageLog = new BaseList<GameMessage>(100);
            visitedTargets = new List<RoomObject>(50);
            clickedTargets = new List<uint>(50);
            actionButtons = new ActionButtonList();
            ignoreList = new List<string>(20);
            chatCommandHistory = new List<string>(20);

            // attach some listeners
            RoomObjects.ListChanged += OnRoomObjectsListChanged;
            Projectiles.ListChanged += OnProjectilesListChanged;
            ChatMessages.ListChanged += OnChatMessagesListChanged;

            // make some lists sorted
            OnlinePlayers.SortByName();
            AvatarSkills.SortByResourceName();
            AvatarSpells.SortByResourceName();
            SpellObjects.SortByName();
            
            // create single data objects
            roomInformation = new RoomInfo();
            lightShading = new LightShading(0, new SpherePosition(0, 0));
            backgroundMusic = new PlayMusic();
            guildInfo = new GuildInfo();
            guildShieldInfo = new GuildShieldInfo();
            guildAskData = new GuildAskData();
            diplomacyInfo = new DiplomacyInfo();
            adminInfo = new AdminInfo();
            tradeInfo = new TradeInfo();
            buyInfo = new BuyInfo();
            welcomeInfo = new WelcomeInfo();
            charCreationInfo = new CharCreationInfo();
            statChangeInfo = new StatChangeInfo();
            newsGroup = new NewsGroup();
            objectContents = new ObjectContents();
            effects = new Effects();
            lookPlayer = new PlayerInfo();
            lookObject = new ObjectInfo();
            clientPreferences = new PreferencesFlags();

            // some values
            ChatMessagesMaximum = 100;
            ChatCommandHistoryMaximum = 20;
            ChatCommandHistoryIndex = -1;
            AvatarObject = null;
            IsResting = false;
            SelfTarget = false;
            IsNextAttackApplyCastOnHighlightedObject = false;
            AvatarID = UInt32.MaxValue;
            TargetID = UInt32.MaxValue;
            ViewerPosition = V3.ZERO;
            UIMode = UIMode.None;
        }
コード例 #7
0
 public ReqStatChangeMessage(StatChangeInfo StatChangeInfo)
     : base(MessageTypeGameMode.ReqStatChange)
 {
     this.StatChangeInfo = StatChangeInfo;          
 }
コード例 #8
0
 public ChangedStatsMessage(StatChangeInfo StatChangeInfo)
     : base(MessageTypeGameMode.ChangedStats)
 {
     this.StatChangeInfo = StatChangeInfo;          
 }
コード例 #9
0
 public ChangedStatsMessage(StatChangeInfo StatChangeInfo)
     : base(MessageTypeGameMode.ChangedStats)
 {
     this.StatChangeInfo = StatChangeInfo;
 }