|
|
public class Reincarnate
public class Reincarnate
{
private Client.GameState _client ;
public static void Reincarnation(Client.GameState client, byte new_class)
{
if (client.Entity.Level < 120)
return;
if (Kernel.ReincarnatedCharacters.ContainsKey(client.Entity.UID)) return;
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;
Kernel.ReincarnatedCharacters.Add(info.UID, info);
Database.MagicTypeOP.Reborn(client, new_class);
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 = 140;
client.Entity.Experience = 0;
client. Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 0;
client.Entity.Spirit = 0;
client.Entity.Atributes = 900;
#region Low level items
for (byte i = 1; i < 9; i++)
{
if (i != 7)
{
ConquerItem item = client.Equipment.TryGetItem(i);
if (item != null && item.ID != 0)
{
try
{
Database.ConquerItemInformation cii =
new Database.ConquerItemInformation(item.ID, item.Plus);
item.ID =
cii.LowestID(
ItemMinLevel(ItemPosition(item.ID)));
item.Mode = Game.Enums.ItemMode.Update;
item.Send(client);
client.LoadItemStats();
Database.ConquerItemTable.UpdateItemID(item, client);
}
catch
{
}
}
}
}
ConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
hand = client.Equipment.TryGetItem(25);
if (hand != null)
{
client.Equipment.Remove(25);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
client.LoadItemStats();
client.SendScreen(client.Entity.SpawnPacket, false);
#endregion
Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
foreach (var Entity in Kernel.GamePool.Values)
Entity.Send(new Message(client.Entity.Name + " has been Reincarnation!", System.Drawing.Color.White, Message.Talk));
Database.EntityTable.SaveEntity(client);
#region ProdectSkills
if (client.Entity.SecondRebornClass == 25 && !client.Spells.ContainsKey(3060))
{
client.AddSpell(new Spell(true) { ID = 3060 });
}
if (client.Spells.ContainsKey(12300) && !client.Entity.PureLeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12300 });
}
if (client.Spells.ContainsKey(12200) && !client.Entity.x2LeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12200 });
}
if (client.Spells.ContainsKey(11040) && !client.Entity.PurePirate())
{
client.RemoveSpell(new Spell(true) { ID = 11040 });
}
#endregion
}
}
public class Reincarnate
public class Reincarnate
{
private Client.GameState _client ;
public static void Reincarnation(Client.GameState client, byte new_class)
{
if (client.Entity.Level < 120)
return;
if (Kernel.ReincarnatedCharacters.ContainsKey(client.Entity.UID)) return;
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;
Kernel.ReincarnatedCharacters.Add(info.UID, info);
Database.MagicTypeOP.Reborn(client, new_class);
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 = 140;
client.Entity.Experience = 0;
client. Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 0;
client.Entity.Spirit = 0;
client.Entity.Atributes = 900;
#region Low level items
for (byte i = 1; i < 9; i++)
{
if (i != 7)
{
ConquerItem item = client.Equipment.TryGetItem(i);
if (item != null && item.ID != 0)
{
try
{
Database.ConquerItemInformation cii =
new Database.ConquerItemInformation(item.ID, item.Plus);
item.ID =
cii.LowestID(
ItemMinLevel(ItemPosition(item.ID)));
item.Mode = Game.Enums.ItemMode.Update;
item.Send(client);
client.LoadItemStats();
Database.ConquerItemTable.UpdateItemID(item, client);
}
catch
{
}
}
}
}
ConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
hand = client.Equipment.TryGetItem(25);
if (hand != null)
{
client.Equipment.Remove(25);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
client.LoadItemStats();
client.SendScreen(client.Entity.SpawnPacket, false);
#endregion
Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
foreach (var Entity in Kernel.GamePool.Values)
Entity.Send(new Message(client.Entity.Name + " has been Reincarnation!", System.Drawing.Color.White, Message.Talk));
Database.EntityTable.SaveEntity(client);
#region ProdectSkills
if (client.Entity.SecondRebornClass == 25 && !client.Spells.ContainsKey(3060))
{
client.AddSpell(new Spell(true) { ID = 3060 });
}
if (client.Spells.ContainsKey(12300) && !client.Entity.PureLeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12300 });
}
if (client.Spells.ContainsKey(12200) && !client.Entity.x2LeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12200 });
}
if (client.Spells.ContainsKey(11040) && !client.Entity.PurePirate())
{
client.RemoveSpell(new Spell(true) { ID = 11040 });
}
#endregion
}
}
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكلة ان الاكونت بيتبعت علي التون سيتي سورس خالد محمد او سورس GoldenEdition | Tefa | تطوير سيرفرات كونكر | 9 | 2020-04-27 06:04 PM |
مشكلة في سورس متركس ام ده سورس :d | محمودمحمدسالم | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-02-15 08:02 PM |
مشكلة بلاك ليست رايزو | nova | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-11-29 05:53 PM |
مشكلة في سورس حسن اكس بلاك | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-07-28 01:59 PM |