本文整理汇总了C#中Client.ExtraAtributePoints方法的典型用法代码示例。如果您正苦于以下问题:C# Client.ExtraAtributePoints方法的具体用法?C# Client.ExtraAtributePoints怎么用?C# Client.ExtraAtributePoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.ExtraAtributePoints方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reincarnation
public Reincarnation(Client.GameState client, byte new_class)
{
if (client.Entity.Level < 130)
return;
_client = client;
RemoveSkill = new SafeDictionary<ushort, PhoenixProject.Interfaces.ISkill>(500);
Addskill = new SafeDictionary<ushort, PhoenixProject.Interfaces.ISkill>(500);
#region Low level items
for (byte i = 1; i < 9; i++)
{
if (i != 7)
{
Interfaces.IConquerItem item = client.Equipment.TryGetItem(i);
if (item != null && item.ID != 0)
{
try
{
//client.UnloadItemStats(item, false);
Database.ConquerItemInformation cii = new PhoenixProject.Database.ConquerItemInformation(item.ID, item.Plus);
item.ID = cii.LowestID(Network.PacketHandler.ItemMinLevel(Network.PacketHandler.ItemPosition(item.ID)));
item.Mode = PhoenixProject.Game.Enums.ItemMode.Update;
item.Send(client);
client.LoadItemStats(client.Entity);
Database.ConquerItemTable.UpdateItemID(item, client);
}
catch
{
Console.WriteLine("Reborn item problem: " + item.ID);
}
}
}
}
Interfaces.IConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.SendStatMessage();
}
else
//client.Screen.send(client.Entity.SpawnPacket, false);
#endregion
#region Remove Extra Skill
if (client.Entity.FirstRebornClass == 15 && client.Entity.SecondRebornClass == 15 && client.Entity.Class == 15)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.DragonWhirl);
}
if (client.Entity.FirstRebornClass == 25 && client.Entity.SecondRebornClass == 25 && client.Entity.Class == 25)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.Perseverance);
}
if (client.Entity.FirstRebornClass == 45 && client.Entity.SecondRebornClass == 45 && client.Entity.Class == 45)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.StarArrow);
}
if (client.Entity.FirstRebornClass == 55 && client.Entity.SecondRebornClass == 55 && client.Entity.Class == 55)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.PoisonStar);
}
if (client.Entity.FirstRebornClass == 65 && client.Entity.SecondRebornClass == 65 && client.Entity.Class == 65)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.SoulShackle);
}
if (client.Entity.FirstRebornClass == 135 && client.Entity.SecondRebornClass == 135 && client.Entity.Class == 135)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.AzureShield);
}
if (client.Entity.FirstRebornClass == 145 && client.Entity.SecondRebornClass == 145 && client.Entity.Class == 145)
{
WontAdd(PhoenixProject.Game.Enums.SkillIDs.HeavenBlade);
}
#endregion
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.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);
client.Spells.Clear();
client.Spells = new SafeDictionary<ushort, PhoenixProject.Interfaces.ISkill>(100);
switch (client.Entity.FirstRebornClass)
{
case 15:
{
Add(PhoenixProject.Game.Enums.SkillIDs.Cyclone);
Add(PhoenixProject.Game.Enums.SkillIDs.Hercules);
Add(PhoenixProject.Game.Enums.SkillIDs.SpiritHealing);
//.........这里部分代码省略.........
示例2: CheckCommand
//.........这里部分代码省略.........
case "clearinventory":
{
Interfaces.IConquerItem[] inventory = new Interfaces.IConquerItem[client.Inventory.Objects.Length];
client.Inventory.Objects.CopyTo(inventory, 0);
foreach (Interfaces.IConquerItem item in inventory)
{
client.Inventory.Remove(item, PhoenixProject.Game.Enums.ItemUse.Remove);
}
break;
}
case "online":
{
client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft));
string line = "";
foreach (Client.GameState pClient in ServerBase.Kernel.GamePool.Values)
line += pClient.Entity.Name + ",";
if (line.Length >= 255)
return true;
client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk));
break;
}
case "reallot":
{
if (client.Entity.Reborn != 0)
{
client.Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 1;
client.Entity.Spirit = 0;
if (client.Entity.Reborn == 1)
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel)
+ 52 + 3 * (client.Entity.Level - 15));
}
else
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) +
client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15));
}
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "str":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Entity.Atributes >= atr)
{
client.Entity.Strength += atr;
client.Entity.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "agi":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Entity.Atributes >= atr)
{
client.Entity.Agility += atr;
示例3: CheckCommand
//.........这里部分代码省略.........
client.Send(new Message("Online players count: " + ServerBase.Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.Message.TopLeft));
string line = "";
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 pClient = (varr.Current as Client.GameState);
line += pClient.Entity.Name + ",";
varr.MoveNext();
}
if (line.Length >= 255)
return true;
client.Send(new GamePackets.Message(line, System.Drawing.Color.Beige, GamePackets.Message.Talk));
break;
}
case "reallot":
{
if (client.Entity.Reborn != 0)
{
client.Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 1;
client.Entity.Spirit = 0;
if (client.Entity.Reborn == 1)
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel)
+ 52 + 3 * (client.Entity.Level - 15));
}
else
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) +
client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15));
}
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "str":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Entity.Atributes >= atr)
{
client.Entity.Strength += atr;
client.Entity.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "agi":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Entity.Atributes >= atr)
{
client.Entity.Agility += atr;
示例4: 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)
//.........这里部分代码省略.........
示例5: GetDialog
//.........这里部分代码省略.........
}
break;
}
#endregion
#region Realloter
case 350050:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello there brave conqueror, if you have reborn, and you misplaced your atribute points or you want to set them another way, I'll reset your atribute points for one DragonBall. Do you accept?");
dialog.Option("Here is the DragonBall.", 1);
dialog.Option("I'll just leave", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.Reborn > 0)
{
if (client.Inventory.Contains(1088000, 1))
{
client.Inventory.Remove(1088000, 1);
if (client.Entity.Reborn != 0)
{
client.Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 1;
client.Entity.Spirit = 0;
if (client.Entity.Reborn == 1)
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornLevel)
+ 52 + 3 * (client.Entity.Level - 15));
}
else
{
client.Entity.Atributes = (ushort)(client.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) +
client.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15));
}
}
}
else
{
dialog.Text("You need a DragonBall.");
dialog.Option("I'll just leave", 255);
dialog.Send();
}
}
else
{
dialog.Text("You have to have atleast one rebirth atleast.");
dialog.Option("I'll just leave", 255);
dialog.Send();
}
break;
}
}
break;
}
#endregion
#region Magic Artisan
case 9071:
{