14 يناير، 2017


بسم الله الرحمن الرحيم
والصلاه والسلام على اشرف المرسلين سيدنا ونبينا محمد صلى الله عليه وسلم
اما بعد:
اليوم باذن الله شرح لاضافه الشخصيه الجديده
ركزوا معايا لان الاضافه طويله شويه
اول حاجه ملفات database 

فك ده فى databaase

database
روح على كلاس DataHolder
هتبحث عن
static SafeDictionary<bytestringWarriorStats = new SafeDictionary<bytestring>(130);
وهتضيف ده تحتو
static SafeDictionary WindWalkerStats = new SafeDictionary(130);
فى نفس الكلاس ابحث عن فويد
void ReadStats()
ابحث عن
job = "Pirate[" + lvl + "]"; Data = IniFile.ReadString("Stats", job); PirateStats.Add(lvl, Data);
ضيف
job = "Windwalker[" + lvl + "]"; Data = IniFile.ReadString("Stats", job); WindwalkerStats.Add(lvl, Data);
نفس الكلاس فويد
void GetStats(byte inClass, byte inLevel, Client.GameState client)
تحت الكود ده
case 70: Class = "Pirate"; break;
ضيف
case 160: Class = "Windwalker"; break;
وتحت الكود ده
else if (Class == "Pirate") Data = PirateStats[inLevel].Split(',');
ضيف
else if (Class == "Windwalker") Data = WindwalkerStats[inLevel].Split(',');
هنعدل فى شفره الكلاس عشان لو كتبت شفره الشخصيه بيقلبك فاير فى PacketHandler or MsgChat ابحث عن
case "class":
بدلها كلها بالاكواد دى
case "class": { byte _class = client.Player.Class; byte.TryParse(Data[1], out _class); _class = Math.Min((byte)165, Math.Max((byte)1, _class)); client.Player.Class = _class; if (client.Player.Reborn == 0) { Database.DataHolder.GetStats(_class, client.Player.Level, client); client.CalculateStatBonus(); client.CalculateHPBonus(); client.GemAlgorithm(); } break; }
الاضافه دى عشان تعرف تلبس الاسلحه واللبس والطاقيه هتروح PacketHandler or MsgGeneralData ابحث عن
void EquipItem
ابحث عن
if (client.Entity.Class >= 80 && client.Entity.Class <= 85)
ضيف فوقه
if (client.Entity.Class >= 160 && client.Entity.Class <= 165) { can2hand = true; can2wpn = true; }
هتنزل هتلاقى سطر كدا هتلاقى السطر ده مرتين بدلهم
if (client.Entity.Class >= 100
بدله بده
if (client.Entity.Class >= 100 && client.Entity.Class <= 145)
هتروح على
void EquipPassJobReq
تحت الكود ده
switch (baseInformation.Class) {
ضيف
#region Windwalker case 160: if (client.Entity.Class <= 165 && client.Entity.Class >= 160) return true; break; case 161: if (client.Entity.Class <= 165 && client.Entity.Class >= 161) return true; break; case 162: if (client.Entity.Class <= 165 && client.Entity.Class >= 162) return true; break; case 163: if (client.Entity.Class <= 165 && client.Entity.Class >= 163) return true; break; case 164: if (client.Entity.Class <= 165 && client.Entity.Class >= 164) return true; break; case 165: if (client.Entity.Class == 165) return true; break; #endregion
ابحث عن
public static ushort ItemPosition
تحت الكود ده
UInt32 iType = ID / 1000;
ضيف
if (ID >= 170000 && ID <= 170309) return ConquerItem.Head; if (ID >= 101000 && ID <= 101309) return ConquerItem.Armor; if (ID >= 626003 && ID <= 626439) return ConquerItem.RightWeapon; if (ID >= 626003 && ID <= 626439) return ConquerItem.LeftWeapon;
لو جالك ايرور فى MsgItemInfo هتبدلها ب ConquerItem ابحث عن
static Positions GetPositionFromID
تحت الكود ده
UInt32 iType = itemid / 1000;
ضيف
if (iType == 170) return Positions.Head; if (iType == 101) return Positions.Armor; if (iType == 626) return Positions.Right;
افنح كلاس EntityTable.cs روح على
void LoadEntity
تحت الكود ده
client.Entity.Class = reader.ReadByte("Class");
ضيف
client.Entity.Windwalker = reader.ReadByte("Windwalker");
روح على void SaveEntity تحت الكود ده
.Set("Class", e.Class)
ضيف
.Set("Windwalker", e.Windwalker)
هتبحث عن
bool CreateEntity
هتبدل ده بالى عندك
switch (eC.Class) { case 0: case 1: eC.Class = 100; break; case 2: case 3: eC.Class = 10; break; case 4: case 5: eC.Class = 40; break; case 6: case 7: eC.Class = 20; break; case 8: case 9: eC.Class = 50; break; case 10: case 11: eC.Class = 60; break; case 12: case 13: eC.Class = 70; break; case 14: case 15: eC.Class = 80; break; case 16: case 17: { eC.Class = 160; client.Player.Windwalker = (byte)8; break; } case 18: case 19: eC.Class = 160; break; default: { Console.WriteLine("Error Class = " + eC.Class); } break; }
نفس الفويد انزل
using (var cmd = new MySqlCommand(MySqlCommandType.INSERT))
وقبل
.Execute();
ضيف
.Insert("Windwalker", client.Entity.Windwalker)
هتبقى كدا
.Insert("Windwalker", client.Player.Windwalker).Execute();
هتروح كلاس
CharacterInfo or MsgUserInfo
هتروح فويد
public byte[] ToArray()
شوف الصح عندك وضيفو الكود ده
if (client.Entity.Class >= 160 && client.Entity.Class <= 165) Writer.WriteUInt32(this.client.Entity.Windwalker, 89, level);
او
if (client.Player.Class >= 160 && client.Player.Class <= 165) *((byte*)(Pack + 89)) = client.Player.Windwalker;
هتروح كلاس
Entity.cs or Player.cs
و ضيف ده فى اى حته
public byte _Windwalker; public byte Windwalker { get { SpawnPacket[304] = _Windwalker; return _Windwalker; } set { _Windwalker = value; SpawnPacket[304] = value; } }
الاسكلات بقا كلاس Handle.cs
#region WindWalker #region RageofWar case 12930: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); InLineAlgorithm ila = new InLineAlgorithm(attacker.X, X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA); MsgMagicEffect suse = new MsgMagicEffect(true); suse.Attacker = attacker.UID; suse.Attacker1 = attacker.UID; suse.SpellID = SpellID; suse.SpellLevel = attacker.Owner.Spells[SpellID].Level; suse.X = X; suse.Y = Y; foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster) { attacked = _obj as Player; if (ila.InLine(attacked.X, attacked.Y)) { if (!CanAttack(attacker, attacked, spell, attack.InteractType == MsgInteract.Melee)) continue; attack.Effect = MsgInteract.InteractEffects.None; uint damage = Calculate.Melee(attacker, attacked, ref attack, spell); suse.Effect = attack.Effect; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked.UID, damage, attack); } } if (_obj.MapObjType == MapObjectType.Player) { attacked = _obj as Player; if (ila.InLine(attacked.X, attacked.Y)) { if (!CanAttack(attacker, attacked, spell, attack.InteractType == MsgInteract.Melee)) continue; attack.Effect = MsgInteract.InteractEffects.None; uint damage = Calculate.Melee(attacker, attacked, ref attack, spell); damage = (uint)(damage / 1.2); suse.Effect = attack.Effect; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked.UID, damage, attack); } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as MsgNpcInfoEX; if (ila.InLine(attackedsob.X, attackedsob.Y)) { if (!CanAttack(attacker, attackedsob, spell)) continue; attack.Effect = MsgInteract.InteractEffects.None; uint damage = Calculate.Melee(attacker, attackedsob, ref attack); suse.Effect = attack.Effect; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.AddTarget(attackedsob.UID, damage, attack); } } } attacker.Owner.SendScreen(suse, true); } break; } #endregion #region TripleBeast case 12850: { if (CanUseSpell(spell, attacker.Owner)) { if (Time32.Now > attacker.TripleBeastStamp.AddMilliseconds(1200)) { attacker.TripleBeastStamp = Time32.Now; PrepareSpell(spell, attacker.Owner); MsgMagicEffect suse = new MsgMagicEffect(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; if (attackedsob == null) { if (CanAttack(attacker, attacked, spell, false)) { attack.Effect = MsgInteract.InteractEffects.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack); damage = (uint)(damage * spell.Power / 100); if (attacker.SwirlingStorm) { damage = (uint)(damage * attacker.SwirlingStormPercent / 100); attacker.SwirlingStorm = false; } suse.Effect = attack.Effect; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked.UID, damage, attack); attacker.Owner.SendScreen(suse, true); } } else { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect = MsgInteract.InteractEffects.None; uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack); damage = (uint)(damage * spell.Power / 100); suse.Effect = attack.Effect; ReceiveAttack(attacker, attackedsob, attack, damage, spell); suse.AddTarget(attackedsob.UID, damage, attack); attacker.Owner.SendScreen(suse, true); } } } } break; } #endregion #region BurntFrost(Stamper) case 12940: { if (CanUseSpell(spell, attacker.Owner)) { PrepareSpell(spell, attacker.Owner); MsgMagicEffect suse = new MsgMagicEffect(true); suse.Attacker = attacker.UID; suse.SpellID = spell.ID; suse.SpellLevel = spell.Level; suse.X = X; suse.Y = Y; Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range, spell.Sector); if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance + 1) { foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects) { if (_obj == null) continue; if (_obj.MapObjType == MapObjectType.Monster) { attacked = _obj as Player; if (sector.IsInFan(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.InteractType == MsgInteract.Melee)) { attack.Effect = MsgInteract.InteractEffects.None; uint damage = Calculate.Melee(attacker, attacked, ref attack, spell); damage = (uint)(damage * spell.Power / 300); suse.Effect = attack.Effect; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked.UID, damage, attack); } } } if (_obj.MapObjType == MapObjectType.Player) { attacked = _obj as Player; if (sector.IsInFan(attacked.X, attacked.Y)) { if (CanAttack(attacker, attacked, spell, attack.InteractType == MsgInteract.Melee)) { attack.Effect = MsgInteract.InteractEffects.None; uint damage = Calculate.Melee(attacker, attacked, ref attack, spell); damage = (uint)(damage * spell.Power / 310); suse.Effect = attack.Effect; ReceiveAttack(attacker, attacked, attack, ref damage, spell); suse.AddTarget(attacked.UID, damage, attack); } } } else if (_obj.MapObjType == MapObjectType.SobNpc) { attackedsob = _obj as MsgNpcInfoEX; if (sector.IsInFan(attackedsob.X, attackedsob.Y)) { if (CanAttack(attacker, attackedsob, spell)) { attack.Effect = MsgInteract.InteractEffects.None; uint pezzi = Calculate.Melee(attacker, attackedsob, ref attack); pezzi = (uint)(pezzi * spell.Power / 300); suse.Effect = attack.Effect; ReceiveAttack(attacker, attackedsob, attack, pezzi, spell); suse.AddTarget(attackedsob.UID, pezzi, attack); } } } } } else { attacker.AttackPacket = null; } attacker.Owner.SendScreen(suse, true); } break; } #endregion #endregion
ودى الاوفيستات الى ذادت ابحث فى انتتى على
#region Offsets
ا
وبدله كله
#region Offsets public static int TimeStamp = 4, _Mesh = 8, _UID = 12, _QuizPoints = 164, UnionID = 274, Offical_Harem_Guards = 282, UnionRank = 286, UnionType = 287, _GuildID = 16, _GuildRank = 20, _StatusFlag = 26, _StatusFlag2 = 34, _StatusFlag3 = 42, _AppearanceType = 50, _Hitpoints = 111, _MonsterLevel = 117, _X = 119, _Y = 121, _HairStyle = 123, _Facing = 125, _Action = 126, _Action2 = 128, _Reborn = 133, _Level = 134, _WindowSpawn = 136, _Away = 137, _ExtraBattlepower = 138, _FlowerIcon = 154, _NobilityRank = 158, _ClanShareBp = 198, _ClanUID = 190, _ClanRank = 194, _Title = 206, _ShowArenaGlow = 213, _WingTitle = 300, _Boss = 216, _AssassinAsBattlePower = 254, _RaceItem = 218, _NewTitle = 292, _ActiveSubclass = 234, _FirstRebornClass = 242, _SecondRebornClass = 244, _Class = 250, _TitleScore = 296, _CountryCode = 248, _BattlePower = 258, _JingHu_Talen = 262, _WingColor = 286, _MyTitleScore = 296, _JiangHuActive = 259, _CUID = 270, _Names = 312; #endregion
النافى كات ارفع ده فى القاعده Spells روح على القاعده فى entities واختار design table وضيف
Windwalker bigint 20 0 -1 0 0 0 0 0 0
الى معندوش spells يبدل الملف ده بالى عنده فى database تيم اكسور



6 תגובות

ممكن تعملي سورس فيها اصل مش عارف اركبو

باذن الله قريبا هنزل سورس بالشخصيه الجديده

انا عملت كل الخطوات زيك بس مفيش حاجه اضافت
في حاجه تضاف للباتش

اكيد لازم تكون مشغل على اخر اصدار من كونكر اونلين علشان الشخصيه تظهر معاك والايتم

مانا مشغل ع اخر اصدار من كونكر

ممكن بس تساعدني اي حاجه اضافها ع الباتش ولا حاجه علشان انا عملت زيك بالظبط ومفيش حاجه ظهرت