本文整理汇总了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>();
}
示例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;
}
示例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;
}
示例4: TradeItem
public TradeItem(ZoneCharacter owner,byte InventorySlot,byte Tradeslot,Item pItem)
{
this.Owner = owner;
this.Item = pItem;
this.InventorySlot = InventorySlot;
this.TradeSlot = Tradeslot;
}
示例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;
}
示例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;
}
}
示例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;
}
示例8: SendChatBlock
public static void SendChatBlock(ZoneCharacter character, int seconds)
{
using (var packet = new Packet(SH2Type.Chatblock))
{
packet.WriteInt(seconds);
character.Client.SendPacket(packet);
}
}
示例9: SendCharacterChunkEnd
public static void SendCharacterChunkEnd(ZoneCharacter character)
{
using (var packet = new Packet(SH4Type.CharacterInfoEnd))
{
packet.WriteUShort(0xFFFF);
character.Client.SendPacket(packet);
}
}
示例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);
}
}
示例11: FailedUnequip
public static void FailedUnequip(ZoneCharacter character)
{
using (var packet = new Packet(SH12Type.FailedUnequip))
{
packet.WriteUShort(706);
character.Client.SendPacket(packet);
}
}
示例12: Trade
public Trade(ZoneCharacter pFrom,ZoneCharacter pTo)
{
this.pCharFrom = pFrom;
this.pCharTo = pTo;
this.pCharFrom.Trade = this;
this.pCharTo.Trade = this;
SendTradeBeginn();
}
示例13: SendDetailedCharacterInfo
public static void SendDetailedCharacterInfo(ZoneCharacter character)
{
using (var packet = new Packet(SH6Type.DetailedCharacterInfo))
{
character.WriteDetailedInfoExtra(packet);
character.Client.SendPacket(packet);
}
}
示例14: GetLoggedInCharacter
public static bool GetLoggedInCharacter(int ID, out ZoneCharacter pChar)
{
pChar = ClientManager.Instance.GetClientByCharID(ID).Character;
if (pChar != null)
{
return true;
}
return false;
}
示例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;
}