コード例 #1
0
ファイル: protocolsend65.cs プロジェクト: Wirless/cyclops
        /// <summary>
        /// Add a creature to the player's client on the map.
        /// </summary>
        /// <param name="creature">The creature to add.</param>
        /// <param name="knowsCreature">Whether the player knows the creature.</param>
        public override void AddTileCreature(Creature creature, bool knowsCreature)
        {
            netmsg.AddByte(0xFB);
            if (knowsCreature)
            {
                netmsg.AddU32(creature.GetID());
            }
            else
            {
                netmsg.AddU32(0);
            }

            netmsg.AddU32(creature.GetID());
            netmsg.AddStringZ(creature.Name, 30);
            netmsg.AddByte((byte)creature.CurrentHealthStatus);
            netmsg.AddByte((byte)creature.CurrentDirection);
            AddOutfit(creature);
            netmsg.AddByte(creature.GetLightLevel());
        }
コード例 #2
0
ファイル: protocolsend65.cs プロジェクト: brewsterl/cyclops
        /// <summary>
        /// Add a creature to the player's client on the map.
        /// </summary>
        /// <param name="creature">The creature to add.</param>
        /// <param name="knowsCreature">Whether the player knows the creature.</param>
        public override void AddTileCreature(Creature creature, bool knowsCreature)
        {
            netmsg.AddByte(0xFB);
            if (knowsCreature) {
                netmsg.AddU32(creature.GetID());
            } else {
                netmsg.AddU32(0);
            }

            netmsg.AddU32(creature.GetID());
            netmsg.AddStringZ(creature.Name, 30);
            netmsg.AddByte((byte)creature.CurrentHealthStatus);
            netmsg.AddByte((byte)creature.CurrentDirection);
            AddOutfit(creature);
            netmsg.AddByte(creature.GetLightLevel());
        }