| Hazem |
2026-11-19 11:05 PM |
حل الدراجون سول على الهات والدرع
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع
عفواً لايمكن عرض الروابط إلا بعد الرد على الموضوع
حل مشكلة الدراجون سول اللي مش بيتركب على الهات والدرع - سورس قهر موبايل النسخة التانية
السلام عليكم
أرواح الهات والدرع الجديدة بتاعة الموبايل زي Tyrant و Dominance للهات و Flame Feather و Golden Scale للدرع، لما تيجي تركبها من Forging > Refinery/Soul > Soul وتدوس Forge مكانش بيحصل حاجة، والميتيورز والروح بيفضلوا زي ما هما.
السبب
السيرفر بيعرف الروح دي لأنهي قطعة من رقمها، والأرقام كانت مكتوبة في الكود لحد أرواح الكمبيوتر القديمة بس:
الهات لحد 820076 والدرع لحد 822072.
أرواح الموبايل أرقامها بعد كده (Tyrant 820092 و Flame Feather 822079)، فالسيرفر كان بيعتبرها مش تبع أي قطعة ويرفض من غير رسالة.
الحل
في ملف:
src/Qahr.Mobile.Game/Storage/ItemType.CheckAddGemFan.cs
كود PHP:
// ============================================================================
// ItemType.CheckAddGemFan - CheckAddGemFan, CheckAddGemTower, CheckAddGemWing, GetItemPoints, GetGemID, TalismanExtra, Purify...
// Part of the partial class ItemType (split by Server/DevTools/CsSplit, code moved unchanged).
// ============================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Qahr.Mobile.Role.Instance;
namespace Qahr.Mobile.Database
{
public partial class ItemType
{
public static bool CheckAddGemFan(Role.Flags.Gem gem)
{
return gem == Role.Flags.Gem.NormalThunderGem || gem == Role.Flags.Gem.RefinedThunderGem || gem == Role.Flags.Gem.SuperThunderGem;
}
public static bool CheckAddGemTower(Role.Flags.Gem gem)
{
return gem == Role.Flags.Gem.NormalGloryGem || gem == Role.Flags.Gem.RefinedGloryGem || gem == Role.Flags.Gem.SuperGloryGem;
}
public static bool CheckAddGemWing(Role.Flags.Gem gem, byte slot)
{
if (slot == 1)
return CheckAddGemFan(gem);
else if (slot == 2)
return CheckAddGemTower(gem);
return false;
}
public static uint GetItemPoints(DBItem _dbitem, Game.MsgServer.MsgGameItem item)
{
uint Points = (uint)(item.GetPerfectionPosition == 9 ? 0 : 50);
if (_dbitem.Level <= 120)
Points += (uint)((double)((double)_dbitem.Level / 10d) * 30);
else if (_dbitem.Level > 120 && _dbitem.Level <= 130)
Points += (uint)((double)((double)_dbitem.Level / 10d) * 50);
else
Points += (uint)((double)((double)_dbitem.Level / 10d) * 60);
if (Database.ItemType.ItemPosition(item.ITEM_ID) != (ushort)Role.Flags.ConquerItem.Garment && Database.ItemType.ItemPosition(item.ITEM_ID) != (ushort)Role.Flags.ConquerItem.SteedMount
&& Database.ItemType.ItemPosition(item.ITEM_ID) != (ushort)Role.Flags.ConquerItem.LeftWeaponAccessory
&& Database.ItemType.ItemPosition(item.ITEM_ID) != (ushort)Role.Flags.ConquerItem.RightWeaponAccessory
&& Database.ItemType.ItemPosition(item.ITEM_ID) != (ushort)Role.Flags.ConquerItem.Relics)
{
switch (_dbitem.ID % 10)
{
case 6: Points += 50; break;
case 7: Points += 150; break;
case 8: Points += 250; break;
case 9: Points += 450; break;
}
}
else Points = 0;
switch (item.Bless)
{
case 1: Points += 100; break;
case 3: Points += 300; break;
case 5: Points += 500; break;
case 7: Points += 700; break;
}
if (item.SocketOne != Role.Flags.Gem.NoSocket)
{
Points += 1000;
switch ((ushort)item.SocketOne % 10)
{
case 1: Points += 200; break;
case 2: Points += 500; break;
case 3: Points += 800; break;
}
}
if (item.SocketTwo != Role.Flags.Gem.NoSocket)
{
Points += 2500;
switch ((ushort)item.SocketTwo % 10)
{
case 1: Points += 200; break;
case 2: Points += 500; break;
case 3: Points += 800; break;
}
}
switch (item.Plus)
{
case 1: Points += 200; break;
case 2: Points += 600; break;
case 3: Points += 1200; break;
case 4: Points += 1800; break;
case 5: Points += 2600; break;
case 6: Points += 3500; break;
case 7: Points += 4800; break;
case 8: Points += 5800; break;
case 9: Points += 6800; break;
case 10: Points += 7800; break;
case 11: Points += 8800; break;
case 12: Points += 10000; break;
}
switch (item.Purification.PurificationLevel)
{
case 7: Points += 2000; break;
case 6: Points += 1600; break;
case 5: Points += 1200; break;
case 4:
{
if (ItemPosition(item.ITEM_ID) == (ushort)Role.Flags.ConquerItem.Ring)
Points += 2000;
else
Points += 800;
break;
}
case 3:
{
Points += 500; break;
}
}
switch (item.Refinary.EffectLevel)
{
case 6: Points += 2000; break;
case 5: Points += 1600; break;
case 4: Points += 1200; break;
case 3: Points += 800; break;
case 2: Points += 200; break;
case 1: Points += 100; break;
}
if (item.GetPerfectionPosition != 9)//steed
Points += (uint)(item.Enchant * 2);
if (item.PerfectionLevel >= 1) Points += 180;
if (item.PerfectionLevel >= 2) Points += 180;
if (item.PerfectionLevel >= 3) Points += 180;
if (item.PerfectionLevel >= 4) Points += 180;
if (item.PerfectionLevel >= 5) Points += 180;
if (item.PerfectionLevel >= 6) Points += 180;
if (item.PerfectionLevel >= 7) Points += 180;
if (item.PerfectionLevel >= 8) Points += 180;
if (item.PerfectionLevel >= 9) Points += 180;
if (item.PerfectionLevel >= 10) Points += 2380;
if (item.PerfectionLevel >= 11) Points += 400;
if (item.PerfectionLevel >= 12) Points += 400;
if (item.PerfectionLevel >= 13) Points += 400;
if (item.PerfectionLevel >= 14) Points += 400;
if (item.PerfectionLevel >= 15) Points += 400;
if (item.PerfectionLevel >= 16) Points += 400;
if (item.PerfectionLevel >= 17) Points += 400;
if (item.PerfectionLevel >= 18) Points += 400;
if (item.PerfectionLevel >= 19) Points += 5150;
if (item.PerfectionLevel >= 20) Points += 650;
if (item.PerfectionLevel >= 21) Points += 650;
if (item.PerfectionLevel >= 22) Points += 650;
if (item.PerfectionLevel >= 23) Points += 650;
if (item.PerfectionLevel >= 24) Points += 650;
if (item.PerfectionLevel >= 25) Points += 650;
if (item.PerfectionLevel >= 26) Points += 650;
if (item.PerfectionLevel >= 27) Points += 650;
if (item.PerfectionLevel >= 28) Points += 100;
if (item.PerfectionLevel >= 29) Points += 100;
if (item.PerfectionLevel >= 30) Points += 100;
if (item.PerfectionLevel >= 31) Points += 100;
if (item.PerfectionLevel >= 32) Points += 100;
if (item.PerfectionLevel >= 33) Points += 100;
if (item.PerfectionLevel >= 34) Points += 100;
if (item.PerfectionLevel >= 35) Points += 100;
if (item.PerfectionLevel >= 36) Points += 100;
if (item.PerfectionLevel >= 37) Points += 100;
if (item.PerfectionLevel >= 38) Points += 100;
if (item.PerfectionLevel >= 39) Points += 100;
if (item.PerfectionLevel >= 40) Points += 100;
if (item.PerfectionLevel >= 41) Points += 100;
if (item.PerfectionLevel >= 42) Points += 100;
if (item.PerfectionLevel >= 43) Points += 100;
if (item.PerfectionLevel >= 44) Points += 100;
if (item.PerfectionLevel >= 45) Points += 100;
if (item.PerfectionLevel >= 46) Points += 100;
if (item.PerfectionLevel >= 47) Points += 100;
if (item.PerfectionLevel >= 48) Points += 100;
if (item.PerfectionLevel >= 49) Points += 100;
if (item.PerfectionLevel >= 50) Points += 100;
if (item.PerfectionLevel >= 51) Points += 100;
if (item.PerfectionLevel >= 52) Points += 100;
if (item.PerfectionLevel >= 53) Points += 100;
if (item.PerfectionLevel >= 54) Points += 100;
if (ItemPosition(item.ITEM_ID) == (ushort)Role.Flags.ConquerItem.Relics)
{
foreach (var attr in item.RelicAttributes.Where(i => i > 0))
{
switch (attr.Type)
{
case Game.MsgServer.MsgChiInfo.ChiAttribute.CriticalStrike: Points += (uint)(5 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.SkillCriticalStrike: Points += (uint)(5 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.Immunity: Points += (uint)(5 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.Breakthrough: Points += (uint)(5 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.Counteraction: Points += (uint)(5 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.HPAdd: Points += (uint)(2 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.AddAttack: Points += (uint)(4 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.AddMagicAttack: Points += (uint)(2 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.AddMagicDefense: Points += (uint)(6 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.PhysicalDamageIncrease: Points += (uint)(2 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.MagicDamageIncrease: Points += (uint)(2 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.PhysicalDamageDecrease: Points += (uint)(2 * attr.Value); break;
case Game.MsgServer.MsgChiInfo.ChiAttribute.MagicDamageDecrease: Points += (uint)(2 * attr.Value); break;
}
}
for (int x = 0; x < item.RelicAttributes.Length; x++)
{
List<uint> AttrTypes = new List<uint>();
int Count = item.RelicAttributes.Count(p => p.Type == item.RelicAttributes[x].Type);
var xuanbaoadditionattr = Database.RuneTable.xuanbaoadditionattr.FirstOrDefault(i => i.Type == (byte)item.RelicAttributes[x].Type && i.Num == Count);
if (xuanbaoadditionattr != null && !AttrTypes.Contains(xuanbaoadditionattr.Type))
{
Points += (ushort)(xuanbaoadditionattr.Score);
AttrTypes.Add(xuanbaoadditionattr.Type);
}
}
}
if (item.AnimaItemID > 0)
Points += (item.AnimaItemID % 100) * 500;
return Points;
}
public static uint GetGemID(Role.Flags.Gem Gem)
{
return (uint)(700000 + (byte)Gem);
}
public static uint[] TalismanExtra = new uint[13] { 0, 6, 30, 70, 240, 740, 2240, 6670, 20000, 60000, 62000, 67000, 73000 };
public static ushort PurifyStabilizationPoints(byte plevel)
{
return purifyStabilizationPoints[Math.Min(plevel - 1, (byte)5)];
}
static ushort[] purifyStabilizationPoints = new ushort[6] { 10, 30, 60, 100, 150, 200 };
public static ushort RefineryStabilizationPoints(byte elevel)
{
return refineryStabilizationPoints[Math.Min(elevel - 1, (byte)4)];
}
static ushort[] refineryStabilizationPoints = new ushort[5] { 10, 30, 70, 150, 270 };
public string GetItemName(uint ID)
{
DBItem item;
if (Pool.ItemsBase.TryGetValue(ID, out item))
{
return item.Name;
}
return "";
}
public static uint ComposePlusPoints(byte plus)
{
return ComposePoints[Math.Min(plus, (byte)12)];
}
public static uint StonePlusPoints(byte plus)
{
return StonePoints[Math.Min((int)plus, 8)];
}
public static bool IsWarriorEpicWeapons(uint ID)
{
return ID / 1000 == 624;
}
static ushort[] StonePoints = new ushort[9] { 1, 10, 40, 120, 360, 1080, 3240, 9720, 29160 };
static ushort[] ComposePoints = new ushort[13] { 20, 20, 80, 240, 720, 2160, 6480, 19440, 58320, 2700, 5500, 9000, 0 };
public static Role.Flags.SoulTyp GetSoulPosition(uint ID)
{
// QahrMobile: the gear souls are 820xxx head, 821xxx necklace, 822xxx armor, 823xxx ring, 824xxx boots (TQ itemtype);
// the old id ranges stopped at the PC souls, so the mobile ones (e.g. Tyrant 820092, Flame Feather 822079) were refused.
switch (ID / 1000)
{
case 820: return Role.Flags.SoulTyp.Headgear;
case 821: return Role.Flags.SoulTyp.Necklace;
case 822: return Role.Flags.SoulTyp.Armor;
case 823: return Role.Flags.SoulTyp.Ring;
case 824: return Role.Flags.SoulTyp.Boots;
}
if (ID >= 800000 && ID <= 800142 || ID >= 800701 && ID <= 800917 || ID >= 801000 && ID <= 801104 || ID >= 801200 && ID <= 801308 || ID >= 827000 && ID <= 827013 || ID >= 800621 && ID <= 800633
|| ID >= 801512 && ID <= 801513)
return Role.Flags.SoulTyp.OneHandWeapon;
if (ID >= 800200 && ID <= 800618 || ID == 801103)
return Role.Flags.SoulTyp.TwoHandWeapon;
return Role.Flags.SoulTyp.None;
}
}
}
الدالة GetSoulPosition بقت بتعرف القطعة من أول 3 أرقام في رقم الروح:
820 هات، 821 سلسلة، 822 درع، 823 خاتم، 824 جزمة.
الملف كامل في فولدر Server اللي مع الموضوع، انسخه واعمل Build وشغل السيرفر.
ملحوظة مهمة
الكلاينت نفسه مش بيعرض الروح في القايمة لو مستوى القطعة أقل من مستوى الروح. يعني روح Tyrant مستواها 130، فلازم الهات يكون 130 أو أكتر عشان تظهر. ده من الكلاينت مش من السيرفر.
الصور بعد الحل:
الأولى روح Tyrant ظاهرة للهات وجاهزة.
التانية الهات بقى عليه Dragon Soul +8 والدفاع زاد 3500.
التالتة الدرع بقى عليه Flame Feather Dragon Soul +8.
|