當前位置: 首頁>>代碼示例>>C#>>正文


C# Game.ZoneCharacter類代碼示例

本文整理匯總了C#中Zepheus.Zone.Game.ZoneCharacter的典型用法代碼示例。如果您正苦於以下問題:C# ZoneCharacter類的具體用法?C# ZoneCharacter怎麽用?C# ZoneCharacter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ZoneCharacter類屬於Zepheus.Zone.Game命名空間,在下文中一共展示了ZoneCharacter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Inventory

 public Inventory(ZoneCharacter pChar)
 {
     InventoryCount = 2;
     InventoryOwner = pChar;
     InventoryItems = new Dictionary<byte, Item>();
     EquippedItems = new List<Item>();
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:7,代碼來源:Inventory.cs

示例2: ExecuteCommand

 public CommandStatus ExecuteCommand(ZoneCharacter character, string[] command)
 {
     if (character == null) return CommandStatus.ERROR;
     CommandInfo info;
     if (commands.TryGetValue(command[0].ToLower(), out info))
     {
         if (info.GmLevel > character.Client.Admin)
         {
             return CommandStatus.GM_LEVEL_TOO_LOW;
         }
         else
         {
             try
             {
                 info.Function(character, command);
                 return CommandStatus.DONE;
             }
             catch (Exception ex)
             {
                 string wholeCommand = string.Join(" ", command);
                 Log.WriteLine(LogLevel.Exception, "Exception while handling command '{0}': {1}", wholeCommand, ex.ToString());
                 return CommandStatus.ERROR;
             }
         }
     }
     else return CommandStatus.NOT_FOUND;
 }
開發者ID:Zepheus,項目名稱:Zepheus_Fiesta,代碼行數:27,代碼來源:CommandHandler.cs

示例3: Animation

 public static Packet Animation(ZoneCharacter character, byte id)
 {
     Packet packet = new Packet(SH8Type.Emote);
     packet.WriteUShort(character.MapObjectID);
     packet.WriteByte(id);
     return packet;
 }
開發者ID:Zepheus,項目名稱:Zepheus_Fiesta,代碼行數:7,代碼來源:Handler8.cs

示例4: TradeItem

 public TradeItem(ZoneCharacter owner,byte InventorySlot,byte Tradeslot,Item pItem)
 {
     this.Owner = owner;
       this.Item = pItem;
       this.InventorySlot = InventorySlot;
       this.TradeSlot = Tradeslot;
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:7,代碼來源:TradeItem.cs

示例5: House

 public House(ZoneCharacter pOwner, HouseType pType, ushort pItemID = 0, string pName = "")
 {
     this.Owner = pOwner;
     this.Type = pType;
     this.ItemID = pItemID;
     this.Name = pName;
 }
開發者ID:Canic,項目名稱:Zepheus_2k15,代碼行數:7,代碼來源:House.cs

示例6: GetStatValue

 public static int GetStatValue(ZoneCharacter pCharacter, StatsByte pByte)
 {
     switch (pByte)
     {
         case StatsByte.MinMelee:
             return pCharacter.MinDamage;
         case StatsByte.MaxMelee:
             return pCharacter.MaxDamage;
         case StatsByte.MinMagic:
             return pCharacter.MinMagic;
         case StatsByte.MaxMagic:
             return pCharacter.MaxMagic;
         case StatsByte.WDef:
             return pCharacter.WeaponDef;
         case StatsByte.MDef:
             return pCharacter.MagicDef;
         case StatsByte.Aim:
             return 5; //TODO load additional equip stats
         case StatsByte.Evasion:
             return 5;
         case StatsByte.StrBonus:
             return pCharacter.StrBonus;
         case StatsByte.EndBonus:
             return pCharacter.EndBonus;
         default:
             return 0;
     }
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:28,代碼來源:BaseStats.cs

示例7: BeginDisplayRest

 public static Packet BeginDisplayRest(ZoneCharacter character)
 {
     Packet packet = new Packet(SH8Type.BeginDisplayRest);
     packet.WriteUShort(character.MapObjectID);
     packet.WriteUShort(character.House.ItemID);
     packet.Fill(10, 0xff);
     return packet;
 }
開發者ID:Zepheus,項目名稱:Zepheus_Fiesta,代碼行數:8,代碼來源:Handler8.cs

示例8: SendChatBlock

 public static void SendChatBlock(ZoneCharacter character, int seconds)
 {
     using (var packet = new Packet(SH2Type.Chatblock))
     {
         packet.WriteInt(seconds);
         character.Client.SendPacket(packet);
     }
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:8,代碼來源:Handler2.cs

示例9: SendCharacterChunkEnd

 public static void SendCharacterChunkEnd(ZoneCharacter character)
 {
     using (var packet = new Packet(SH4Type.CharacterInfoEnd))
     {
         packet.WriteUShort(0xFFFF);
         character.Client.SendPacket(packet);
     }
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:8,代碼來源:Handler4.cs

示例10: FailedEquip

 public static void FailedEquip(ZoneCharacter character, ushort val = 0)
 {
     using (var packet = new Packet(SH12Type.FailedEquip))
     {
         packet.WriteUShort(val);
         character.Client.SendPacket(packet);
     }
 }
開發者ID:Canic,項目名稱:Zepheus_2k15,代碼行數:8,代碼來源:Handler12.cs

示例11: FailedUnequip

 public static void FailedUnequip(ZoneCharacter character)
 {
     using (var packet = new Packet(SH12Type.FailedUnequip))
     {
         packet.WriteUShort(706);
         character.Client.SendPacket(packet);
     }
 }
開發者ID:Canic,項目名稱:Zepheus_2k15,代碼行數:8,代碼來源:Handler12.cs

示例12: Trade

 public Trade(ZoneCharacter pFrom,ZoneCharacter pTo)
 {
     this.pCharFrom = pFrom;
     this.pCharTo = pTo;
     this.pCharFrom.Trade = this;
     this.pCharTo.Trade = this;
     SendTradeBeginn();
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:8,代碼來源:Trade.cs

示例13: SendDetailedCharacterInfo

 public static void SendDetailedCharacterInfo(ZoneCharacter character)
 {
     using (var packet = new Packet(SH6Type.DetailedCharacterInfo))
     {
         character.WriteDetailedInfoExtra(packet);
         character.Client.SendPacket(packet);
     }
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:8,代碼來源:Handler6.cs

示例14: GetLoggedInCharacter

 public static bool GetLoggedInCharacter(int ID, out ZoneCharacter pChar)
 {
     pChar = ClientManager.Instance.GetClientByCharID(ID).Character;
        if (pChar != null)
        {
        return true;
        }
        return false;
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:9,代碼來源:CharacterManager.cs

示例15: CreateLocationFromPlayer

 public static MobBreedLocation CreateLocationFromPlayer(ZoneCharacter pCharacter, ushort mobID)
 {
     MobBreedLocation mbl = new MobBreedLocation();
     mbl.MobID = mobID;
     mbl.MapID = pCharacter.MapID;
     mbl.InstanceID = pCharacter.Map.InstanceID;
     mbl.Position = new Vector2(pCharacter.Position);
     return mbl;
 }
開發者ID:Dextan,項目名稱:Estrella,代碼行數:9,代碼來源:MobBreedLocation.cs


注:本文中的Zepheus.Zone.Game.ZoneCharacter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。