本文整理汇总了C#中Client.AddSpell方法的典型用法代码示例。如果您正苦于以下问题:C# Client.AddSpell方法的具体用法?C# Client.AddSpell怎么用?C# Client.AddSpell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.AddSpell方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reincarnation
public Reincarnation(Client.GameState client, byte new_class)
{
if (client.Entity.Level < 120)
return;
if (ServerBase.Kernel.ReincarnatedCharacters.ContainsKey(client.Entity.UID))
return;
_client = client;
Database.ReincarnationTable.NewReincarnated(client.Entity);
Game.Features.Reincarnation.ReincarnateInfo info = new Game.Features.Reincarnation.ReincarnateInfo();
info.UID = client.Entity.UID;
info.Level = client.Entity.Level;
info.Experience = client.Entity.Experience;
ServerBase.Kernel.ReincarnatedCharacters.Add(info.UID, info);
client.Entity.FirstRebornClass = client.Entity.SecondRebornClass;
client.Entity.SecondRebornClass = client.Entity.Class;
client.Entity.Class = new_class;
client.Entity.SecondRebornLevel = client.Entity.Level;
//client.Entity.ReincarnationLev = client.Entity.Level;//kikoz
client.Entity.Level = 15;
client.Entity.Experience = 0;
client.Entity.Atributes =
(ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornClass, client.Entity.FirstRebornLevel) +
client.ExtraAtributePoints(client.Entity.SecondRebornClass, client.Entity.SecondRebornLevel) + 62);
#region RemoveAllSpells
Interfaces.ISkill[] spells = client.Spells.Values.ToArray();
foreach (Interfaces.ISkill spell in spells)
{
if (!ServerBase.Constants.AvaibleSpells.Contains(spell.ID))
{
client.RemoveSpell(spell);
}
//spell.Send(client);
}
#endregion
#region Blessed
if (client.Entity.Reborn == 2)
{
if (client.Entity.Reborn == 2)
{
client.AddSpell(new Spell(true) { ID = 9876 });//Bless
}
}
#endregion
#region SeconedClassTrojan
if (client.Entity.SecondRebornClass == 15)
{
if (client.Entity.SecondRebornClass == 15)
{
client.AddSpell(new Spell(true) { ID = 1190 });//SpiritHealing
client.AddSpell(new Spell(true) { ID = 1110 });//Cyclone
client.AddSpell(new Spell(true) { ID = 1270 });//Robot
client.AddSpell(new Spell(true) { ID = 1015 });//Accury
}
}
#endregion
#region SeconedClassWarrior
if (client.Entity.SecondRebornClass == 25)
{
if (client.Entity.SecondRebornClass == 25)
{
client.AddSpell(new Spell(true) { ID = 1040 });//Raor
client.AddSpell(new Spell(true) { ID = 1051 });//Dash
client.AddSpell(new Spell(true) { ID = 1320 });//FlyingMoon
client.AddSpell(new Spell(true) { ID = 1025 });//Superman
}
}
#endregion
#region SeconedClassArcher
if (client.Entity.SecondRebornClass == 45)
{
if (client.Entity.SecondRebornClass == 45)
{
}
}
#endregion
#region SeconedClassNinja
if (client.Entity.SecondRebornClass == 55)
{
if (client.Entity.SecondRebornClass == 55)
{
client.AddSpell(new Spell(true) { ID = 6001 });//ToxicFog
client.AddSpell(new Spell(true) { ID = 6004 });//ArcherBane
}
}
#endregion
#region SeconedClassMonk
if (client.Entity.SecondRebornClass == 65)
{
if (client.Entity.SecondRebornClass == 65)
{
client.AddSpell(new Spell(true) { ID = 10400 });//Serenity
client.AddSpell(new Spell(true) { ID = 10425 });//Tranquality
}
}
#endregion
#region SeconedClassWater
if (client.Entity.SecondRebornClass == 135)
//.........这里部分代码省略.........
示例2: CheckCommand
//.........这里部分代码省略.........
{
Data datas = new Data(true);
datas.UID = C.Entity.UID;
datas.ID = 104;
datas.dwParam = 0;
//datas.wParam1 = (ushort)Program.ScreenColor;
//datas.wParam2 = (ushort)Program.ScreenColor;
//datas.wParam2 = 104;
//datas.wParam4 = (ushort)Program.ScreenColor;
C.Send(datas);
}
}
break;
}
case "give":
{
foreach (var Client in ServerBase.Kernel.GamePool.Values)
{
if (Client.Entity.Name.ToLower().Contains(Data[1]))
{
switch (Data[2])
{
case "vip":
Client.Entity.VIPLevel = byte.Parse(Data[3]);
break;
case "cps":
Client.Entity.ConquerPoints += uint.Parse(Data[3]);
break;
case "money":
Client.Entity.Money += uint.Parse(Data[3]);
break;
case "spell":
Client.AddSpell(new Spell(true) { ID = ushort.Parse(Data[3]) });
break;
case "level":
Client.Entity.Level = byte.Parse(Data[3]);
break;
case "plustone":
{
UInt32 ItemId = UInt32.Parse(Data[3]);
if (Database.ConquerItemInformation.BaseInformations.ContainsKey(ItemId))
{
Database.ConquerItemBaseInformation iteminfo;
if (Database.ConquerItemInformation.BaseInformations.TryGetValue(ItemId, out iteminfo))
{
Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true);
newItem.ID = iteminfo.ID;
Byte Plus = (Byte)(newItem.ID % 730000);
Console.WriteLine("Item Plus " + Plus);
newItem.Plus = (Byte)(newItem.ID % 730000);
Client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
}
}
break;
}
case "item":
{
string ItemName = Data[3];
Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed;
switch (Data[4].ToLower())
{
case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break;
case "normal": Quality = Game.Enums.ItemQuality.Normal; break;
case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break;
case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break;
示例3: UseItem
//.........这里部分代码省略.........
uint itemid = 500129;
if (client.Entity.Level >= 10)
{
if (client.Inventory.Count < 32)
{
client.Inventory.Add(1200000, 0, 1);//PrayingStone
client.Inventory.Add(723700, 0, 1);//ExpBall
client.Inventory.Add(723017, 0, 5); //ExpPotion
ConquerItem items = new ConquerItem(true);
items.ID = itemid;
items.Color = PhoenixProject.Game.Enums.Color.White;
items.Plus = 5;
items.SocketOne = PhoenixProject.Game.Enums.Gem.EmptySocket;
items.Durability = items.MaximDurability = PhoenixProject.Database.ConquerItemInformation.BaseInformations[itemid].Durability;
client.Inventory.Add(items, PhoenixProject.Game.Enums.ItemUse.CreateAndAdd);
client.Inventory.Remove(item, PhoenixProject.Game.Enums.ItemUse.Remove);
}
else
client.Send(new Message("You need to make atleast 8 free spots in your inventory.", System.Drawing.Color.Red, Message.TopLeft));
}
else
client.Send(new Message("You must be atleast level 10 to open the Pack", System.Drawing.Color.Red, Message.TopLeft));
break;
}
#endregion
#endregion
#region SkillBooks
case 725000:
{
if (client.Entity.Spirit >= 20)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.AddSpell(new Spell(true) { ID = 1000 });
}
else
{
client.Send(new Message("You need atleast 20 spirit!", System.Drawing.Color.Tan, Message.TopLeft));
}
break;
}
case 725001:
{
if (client.Entity.Spirit >= 80)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.AddSpell(new Spell(true) { ID = 1001 });
}
else
{
client.Send(new Message("You need atleast 80 spirit!", System.Drawing.Color.Tan, Message.TopLeft));
}
break;
}
case 725002:
{
if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 90)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.AddSpell(new Spell(true) { ID = 1002 });
}
break;
}
case 725003:
{
if (client.Entity.Spirit >= 30)
示例4: LoginMessages
//.........这里部分代码省略.........
}
if (client.Spells.ContainsKey(11100))
{
if (client.Entity.SecondRebornClass == 75 && client.Entity.FirstRebornClass == 75)
{
// client.AddSpell(new Spell(true) { ID = 3050 });
}
else
{
if (client.Entity.SecondRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75)
{
// client.AddSpell(new Spell(true) { ID = 3050 });
}
else
{
if (client.Entity.FirstRebornClass == 75 && client.Entity.Class >= 70 && client.Entity.Class <= 75)
{
// client.AddSpell(new Spell(true) { ID = 3050 });
}
else
{
client.RemoveSpell(new Spell(true) { ID = 11100 });
}
}
}
}
if (client.Spells.ContainsKey(11050))
{
if (client.Spells[11050].Level > 0)
{
client.RemoveSpell(new Spell(true) { ID = 11050 });
client.AddSpell(new Spell(true) { ID = 11050 });
}
}
if (client.Entity.Class >= 50 && client.Entity.Class <= 55)
{
if (!client.Spells.ContainsKey(11230))
{
client.AddSpell(new Spell(true) { ID = 11230 });
}
}
else
{
if (client.Spells.ContainsKey(11230))
{
client.RemoveSpell(new Spell(true) { ID = 11230 });
}
}
if (client.Entity.Class >= 142 && client.Entity.Class <= 145 && client.Entity.FirstRebornClass == 145 && client.Entity.SecondRebornClass == 145)
{
if (!client.Spells.ContainsKey(10310))
{
client.AddSpell(new Spell(true) { ID = 10310 });
}
}
else
{
if (client.Spells.ContainsKey(10310))
{
client.RemoveSpell(new Spell(true) { ID = 10310 });
}
示例5: CheckCommand
//.........这里部分代码省略.........
{
newItem.SocketOne = (Game.Enums.Gem)soc1;
}
if (Data.Length > 7)
{
byte soc2 = 0;
byte.TryParse(Data[7], out soc2);
if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2))
{
newItem.SocketTwo = (Game.Enums.Gem)soc2;
}
}
if (Data.Length > 10)
{
byte R = 0, G = 0, B = 0;
byte.TryParse(Data[8], out R);
byte.TryParse(Data[9], out G);
byte.TryParse(Data[10], out B);
newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16));
}
}
}
}
}
newItem.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8);
client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
}
break;
}
case "spell2":
{
foreach (var Client in ServerBase.Kernel.GamePool.Values)
{
Client.AddSpell(new Spell(true) { ID = ushort.Parse(Data[1]) });
}
}
break;
#endregion
case "give":
{
var varr = ServerBase.Kernel.GamePool.Values.GetEnumerator();
varr.MoveNext();
int COunt = ServerBase.Kernel.GamePool.Count;
for (uint x = 0;
x < COunt;
x++)
{
if (x >= COunt) break;
Client.GameState Client = (varr.Current as Client.GameState);
if (Client.Entity.Name.ToLower().Contains(Data[1]))
{
switch (Data[2])
{
case "at":
{
Client.Entity.Atributes = byte.Parse(Data[3]);
break;
}
case "vip":
Client.Entity.VIPLevel = byte.Parse(Data[3]);
break;
case "cps":
Client.Entity.ConquerPoints += uint.Parse(Data[3]);
break;
示例6: UseItem
//.........这里部分代码省略.........
client.Entity.TransformationID = 0;
client.Entity.TransformationStamp = Time32.Now;
}
ushort transformation = selected;
client.Entity.TransformationID = transformation;
client.Entity.TransformationStamp = Time32.Now;
client.Entity.TransformationTime = 110;
SpellUse spellUse = new SpellUse(true);
spellUse.Attacker = client.Entity.UID;
spellUse.SpellID = 1360;
spellUse.SpellLevel = 4;
spellUse.X = client.Entity.X;
spellUse.Y = client.Entity.Y;
spellUse.Targets.Add(client.Entity.UID, (uint)0);
client.Send(spellUse);
client.Entity.TransformationMaxHP = 3000;
double maxHP = client.Entity.MaxHitpoints;
double HP = client.Entity.Hitpoints;
double point = HP / maxHP;
client.Entity.Hitpoints = (uint)(client.Entity.TransformationMaxHP * point);
client.Entity.Update(Update.MaxHitpoints, client.Entity.TransformationMaxHP, false);
break;
}
#endregion
#endregion
#region SkillBooks
case 725000:
{
if (client.Entity.Spirit >= 20)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
client.AddSpell(new Spell(true) { ID = 1000 });
}
else
{
client.Send(new Message("You need atleast 20 spirit!", System.Drawing.Color.Tan, Message.TopLeft));
}
break;
}
case 725001:
{
if (client.Entity.Spirit >= 80)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
client.AddSpell(new Spell(true) { ID = 1001 });
}
else
{
client.Send(new Message("You need atleast 80 spirit!", System.Drawing.Color.Tan, Message.TopLeft));
}
break;
}
case 725002:
{
if (client.Entity.Class >= 140 && client.Entity.Class <= 145 && client.Entity.Level >= 90)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Delete);
client.AddSpell(new Spell(true) { ID = 1002 });
}
break;
}
case 725003:
{
if (client.Entity.Spirit >= 30)
示例7: GetDialog
//.........这里部分代码省略.........
}
case 5:
{
if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
{
dialog.Text("Which aura do you want to learn?");
dialog.Option("Tyrant (Lvl 20).", 13);
dialog.Option("Fend (Lvl 20)", 14);
dialog.Option("Metal (Lvl 100)", 15);
dialog.Option("Wood (Lvl 100)", 16);
dialog.Option("Water (Lvl 100)", 17);
dialog.Option("Fire (Lvl 100)", 18);
dialog.Option("Earth (Lvl 100)", 19);
dialog.Option("Back to skills.", 2);
dialog.Send();
}
else
{
dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
dialog.Option("Alright.", 255);
dialog.Send();
}
break;
}
case 6:
{
if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
{
if (client.Entity.Level >= 5)
{
dialog.Text("You have learned Triple Attack.");
dialog.Option("Thank you master.", 255);
dialog.Send();
if (!client.AddSpell(LearnableSpell(10490)))
{
dialog.Text("You already know this skill.");
dialog.Option("Thank you master.", 255);
dialog.Send();
}
}
else
{
dialog.Text("You need to be level 5 or more.");
dialog.Option("Alright.", 255);
dialog.Send();
}
}
else
{
dialog.Text("The ancient secrets of the monk is not for trade.\nIf you wish to learn the secrets of the monk come back in another life. Good bye.");
dialog.Option("Alright.", 255);
dialog.Send();
}
break;
}
case 7:
{
if (client.Entity.Class >= 60 && client.Entity.Class <= 65)
{
if (client.Entity.Level >= 15)
{
dialog.Text("You have learned the Oblivion XP skill.");
dialog.Option("Thank you master.", 255);
dialog.Send();
if (!client.AddSpell(LearnableSpell(10390)))
{