本文整理汇总了C#中Zepheus.Zone.Game.ZoneCharacter类的典型用法代码示例。如果您正苦于以下问题:C# ZoneCharacter类的具体用法?C# ZoneCharacter怎么用?C# ZoneCharacter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ZoneCharacter类属于Zepheus.Zone.Game命名空间,在下文中一共展示了ZoneCharacter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: SendSkillLearnt
public static void SendSkillLearnt(ZoneCharacter character, ushort skillid)
{
using (var packet = new Packet(SH18Type.LearnSkill))
{
packet.WriteUShort(skillid);
packet.WriteByte(0); //unk
character.Client.SendPacket(packet);
}
}
开发者ID:Canic,项目名称:Zepheus_2k15,代码行数:9,代码来源:Handler18.cs
示例17: SendChangeMap
public static void SendChangeMap(ZoneCharacter character, ushort mapid, int x, int y)
{
using (var packet = new Packet(SH6Type.ChangeMap))
{
packet.WriteUShort(mapid);
packet.WriteInt(x);
packet.WriteInt(y);
character.Client.SendPacket(packet);
}
}
开发者ID:Dextan,项目名称:Estrella,代码行数:10,代码来源:Handler6.cs
示例18: Equip
public static Packet Equip(ZoneCharacter character, Item equip)
{
//B2 00 - AB 38 - 07 - 0D 00 04
Packet packet = new Packet(SH7Type.ShowEquip);
packet.WriteUShort(character.MapObjectID);
packet.WriteUShort(equip.ID);
packet.WriteByte(equip.UpgradeStats.Upgrades);
packet.Fill(3, 0xff);
return packet;
}
开发者ID:Dextan,项目名称:Estrella,代码行数:10,代码来源:Handler7.cs
示例19: TradeReqest
public TradeReqest(ZoneCharacter pFrom, ushort ToMapObjectID)
{
if (pFrom.SelectedObject.MapObjectID == ToMapObjectID)
{
this.CrationTimeStamp = DateTime.Now;
this.pToTradeClient = pFrom.SelectedObject as ZoneCharacter;
this.pFromTradeClient = pFrom;
this.MapID = pFrom.MapID;
}
}
开发者ID:Dextan,项目名称:Estrella,代码行数:10,代码来源:TradeReqest.cs
示例20: Skill
public Skill(ZoneCharacter c, ushort id)
{
DatabaseSkill db = new DatabaseSkill();
db.Owner = c.ID;
db.SkillID = (short)id;
db.Upgrades = 0;
db.IsPassive = false;
db.Character = c.Character;
Program.CharDBManager.GetClient().ExecuteQuery("INSERT INTO Skillist (ID,Owner,SkillID,Upgrades,IsPassive) VALUES ('" + c.Character.ID + "','" + db.SkillID + "','" + db.Upgrades + "','" + Convert.ToInt32(IsPassive) + "')");
skill = db;
}
开发者ID:Dextan,项目名称:Estrella,代码行数:11,代码来源:Skill.cs
注:本文中的Zepheus.Zone.Game.ZoneCharacter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论