منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   مشكلات السيرفيرات كونكر الشخصيه (https://code.vpscairo.com/forumdisplay.php?f=12)
-   -   مشكله في رنك البريفكشن سورس Immortals (https://code.vpscairo.com/showthread.php?t=3065)

Adel Abd El Hay 2019-11-22 06:03 PM

مشكله في رنك البريفكشن سورس Immortals
 
بعد اذن الرجاله محتاج حل لمشكلة رنك البريفكشن في سورس Immortals
مفيش غير اكوت واحد بس اللي ظاهر والرنك برضو واحد بس اللي ظاهر
https://5.top4top.net/p_1421atst51.jpg
https://6.top4top.net/p_14214y2lb2.jpg

Rider 2019-11-22 06:31 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اسحب برفكشن من رايزو اخر اصدار يا حب <3
https://code.vpscairo.com/showthread.php?p=22746

Adel Abd El Hay 2019-11-22 07:49 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
مهو المشكله اني مابعرفش اسحبوا من ملفات ايه بالظبط ياحبي دا غير ان سورس تكويد Msg
ورايزو تكويد عادي :D

Rider 2019-11-22 08:04 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
دور علي دول هيوصلوك للبرفكشن كامل
كود PHP:

 new MsgUserAbilityScore().GetRankingList();
                new 
MsgEquipRefineRank().UpdateRanking();
                new 
MsgRankMemberShow().UpdateBestPlayer(); 


Adel Abd El Hay 2019-11-22 08:37 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
تمام اسحبهم من سورس رايزو واحطهم ف نفس الاماكن ف سورسي ؟

Adel Abd El Hay 2019-11-22 08:45 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 22788)
دور علي دول هيوصلوك للبرفكشن كامل
كود PHP:

 new msguserabilityscore().getrankinglist();
                new 
msgequiprefinerank().updateranking();
                new 
msgrankmembershow().updatebestplayer(); 


ال 3 اكواد دول كل واحد فيهم ليه كلاس اسحبو من سورس رايزو وابدلهم ب اللي ف سورسي ؟!
مش كدا ؟

Rider 2019-11-22 09:09 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة adel abd el hay (المشاركة 22791)
ال 3 اكواد دول كل واحد فيهم ليه كلاس اسحبو من سورس رايزو وابدلهم ب اللي ف سورسي ؟!
مش كدا ؟

اها بالظبط كده غالبا هتلاقيهم كلهم ف كلاس واحد

Adel Abd El Hay 2019-11-23 12:57 AM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 22792)
اها بالظبط كده غالبا هتلاقيهم كلهم ف كلاس واحد

ايرور كتير بسبب ان السورسين مختلفين دا غير ان الكود الاخير مختلف تماما بين الاتنين

Adel Abd El Hay 2019-11-23 06:29 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
معلش ياحبي بس انا غلب مع المشكله دي ياريت تشوف السورس وتقولي ايه الحل ؟

Rider 2019-11-23 07:38 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
جرب ف Perfection.cs

ضيف
كود PHP:

  public unsafe class MsgRankMemberShow Writer
    
{
        public 
MsgRankMemberShow() { }
        public 
MsgRankMemberShowProto Info;
        [
ProtoContract]
        public class 
MsgRankMemberShowProto
        
{
            [
ProtoMember(1IsRequired true)]
            public 
uint ActionId;
            [
ProtoMember(2IsRequired true)]
            public 
MsgRankMemberShowProtoSer proto;
        }
        [
ProtoContract]
        public class 
MsgRankMemberShowProtoSer
        
{
            [
ProtoMember(1IsRequired true)]
            public 
uint dwParam;
            [
ProtoMember(2IsRequired true)]
            public 
uint Count;
            [
ProtoMember(3IsRequired true)]
            public 
uint UID;
            [
ProtoMember(4IsRequired true)]
            public 
string Name "";
            [
ProtoMember(5IsRequired true)]
            public 
string Guild "";
            [
ProtoMember(6IsRequired true)]
            public 
uint Mesh;
            [
ProtoMember(7IsRequired true)]
            public 
uint HairStyle;
            [
ProtoMember(8IsRequired true)]
            public 
uint Hat;
            [
ProtoMember(9IsRequired true)]
            public 
uint Garment;
            [
ProtoMember(10IsRequired true)]
            public 
uint LeftWep;
            [
ProtoMember(11IsRequired true)]
            public 
uint LeftWepAcc;
            [
ProtoMember(12IsRequired true)]
            public 
uint RightWep;
            [
ProtoMember(13IsRequired true)]
            public 
uint RightWepAcc;
            [
ProtoMember(14IsRequired true)]
            public 
uint MountArmor;
            [
ProtoMember(15IsRequired true)]
            public 
uint Flag;
            [
ProtoMember(16IsRequired true)]
            public 
uint Wing;
            [
ProtoMember(17IsRequired true)]
            public 
uint WingLevel;
            [
ProtoMember(18IsRequired true)]
            public 
uint Title;
            [
ProtoMember(19IsRequired true)]
            public 
uint Flag2;
            [
ProtoMember(20IsRequired true)]
            public 
uint Flag3;
            [
ProtoMember(21IsRequired true)]
            public 
uint Flag4;
        }
        public 
void UpdateBestPlayer()
        {
            
Stuff = new Dictionary<stringuint>();
            
BestPlayer Network.GamePackets.MsgUserAbilityScore.RankingList.OrderByDescending(=> i.Prestige).ThenByDescending(=> i.Level).ThenBy(=> i.UID).FirstOrDefault();
            if (
BestPlayer == null) return;
            
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID"BestPlayer.UID).And("Position"0true))
            
using (var reader = new MySqlReader(cmd))
            {
                while (
reader.Read())
                {
                    if (
reader.ReadByte("Position") == 5Stuff.Add(GetPositionName(5), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 9) if (!Stuff.ContainsKey(GetPositionName(9))) Stuff.Add(GetPositionName(9), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 4Stuff.Add(GetPositionName(4), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 19)
                    {
                        
Stuff.Add(GetPositionName(19), reader.ReadUInt32("ID"));
                        
Stuff.Add(GetPositionName(255), reader.ReadByte("Plus"));
                    }
                }
                if (!
Stuff.Keys.Contains("MountArmor"))
                {
                    
using (var cmd2 = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID"BestPlayer.UID).And("Position"0true))
                    
using (var reader2 = new MySqlReader(cmd2))
                    {
                        while (
reader2.Read())
                        {
                        }
                    }
                }
            }
        }
        public static 
string GetPositionName(byte Position)
        {
            if (
Position == 1) return "Hat";
            if (
Position == 3) return "Armor";
            if (
Position == 5) return "LeftWep";
            if (
Position == 9) return "Garment";
            if (
Position == 16) return "LeftWepAcc";
            if (
Position == 17) return "MountArmor";
            if (
Position == 4) return "RightWep";
            if (
Position == 15) return "RightWepAcc";
            if (
Position == 19) return "Wing";
            if (
Position == 255) return "WingLevel";
            return 
"Unknwon";
        }
        public static 
Dictionary<stringuintStuff = new Dictionary<stringuint>();
        public static 
Game.Player BestPlayer;
        public 
void Handle(Client.GameState client)
        {
            if (
BestPlayer == null) return;
            switch (
Info.ActionId)
            {
                case 
0:
                    {
                        var 
proto2 = new MsgRankMemberShowProto();
                        
proto2.ActionId 0;
                        
proto2.proto = new MsgRankMemberShowProtoSer();
                        
proto2.proto.dwParam 1;
                        
proto2.proto.Count 1;
                        
proto2.proto.UID BestPlayer.UID;
                        
//proto2.proto.HairStyle = BestPlayer.HairStyle;
                        
proto2.proto.Mesh BestPlayer.Mesh;
                        
proto2.proto.Name BestPlayer.Name;
                        if (
BestPlayer.GuildID != 0)
                            
proto2.proto.Guild Kernel.Guilds[BestPlayer.GuildID].Name;
                        
proto2.proto.Hat Stuff.Where(=> i.Key == "Hat").FirstOrDefault().Value;
                        
proto2.proto.LeftWep Stuff.Where(=> i.Key == "LeftWep").FirstOrDefault().Value;
                        
proto2.proto.LeftWepAcc Stuff.Where(=> i.Key == "LeftWepAcc").FirstOrDefault().Value;
                        
proto2.proto.MountArmor Stuff.Where(=> i.Key == "MountArmor").FirstOrDefault().Value;
                        
proto2.proto.Garment Stuff.Where(=> i.Key == "Garment").FirstOrDefault().Value;
                        
proto2.proto.RightWep Stuff.Where(=> i.Key == "RightWep").FirstOrDefault().Value;
                        
proto2.proto.RightWepAcc Stuff.Where(=> i.Key == "RightWepAcc").FirstOrDefault().Value;
                        
proto2.proto.WingLevel Stuff.Where(=> i.Key == "WingLevel").FirstOrDefault().Value;
                        
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("entities").Where("UID"BestPlayer.UID))
                        
using (var reader = new MySqlReader(cmd))
                        {
                            while (
reader.Read())
                            {
                                
proto2.proto.HairStyle reader.ReadUInt32("HairStyle");
                                
//Console.WriteLine(proto2.proto.HairStyle + " and " + BestPlayer.HairStyle);
                                
proto2.proto.Wing reader.ReadUInt32("WingID");
                                
proto2.proto.Title reader.ReadUInt32("TitleID");

                            }
                        }
                        
//if (Kernel.GamePool.ContainsKey(BestPlayer.UID))
                        //{
                        //    proto2.proto.Flag = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag;
                        //    proto2.proto.Flag2 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag2;
                        //    proto2.proto.Flag3 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag3;
                        //    proto2.proto.Flag4 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag4;
                        //}
                        
client.Send(Kernel.FinalizeProtoBuf(proto23257));
                        break;
                    }
                case 
1:
                    {
                        if (
Kernel.GamePool.ContainsKey(Info.proto == null Info.proto.dwParam))
                        {
                            
PacketHandler.ObserveEquipment(new MsgActionProto() { ID 117UID client.Entity.UIDdwParam Info.proto == null Info.proto.dwParam }, client);
                        }
                        else
                        {
                            
client.Send(Kernel.FinalizeProtoBuf(Info3257));
                        }
                        break;
                    }
            }

        }
        public 
bool Read(byte[] packet)
        {
            var 
mypkt = new byte[packet.Length 4];
            Array.
Copy(packet4mypkt0mypkt.Length);
            try
            {
                
using (var memoryStream = new MemoryStream(packet))
                {
                    
Info Serializer.DeserializeWithLengthPrefix<MsgRankMemberShowProto>(memoryStreamPrefixStyle.Fixed32);
                }
            }
            catch (
Exception e)
            {
                
Console.WriteLine(e);
                return 
false;
            }
            return 
true;
        }
    } 

ف

player.cs
ضيف
كود PHP:

 public uint Prestige
        
{
            
get
            
{
                if (
Owner == null) return totalperfectionscore_;
                
uint points 0;
                
points += Owner.Equipment.GetFullEquipmentEnumPoints;
                
points += Owner.Equipment.GetFullEquipmentSocketPoints;
                
points += Owner.Equipment.GetFullEquipmentGemPoints;
                
points += Owner.Equipment.GetFullEquipmentPlusPoints;
                
points += Owner.Equipment.GetFullEquipmentBlessPoints;
                
points += Owner.Equipment.GetFullEquipmentRefinePoints;
                
points += Owner.Equipment.GetFullEquipmentSoulPoints;
                
points += Owner.Equipment.GetFullEquipmentEnchantPoints;
                
points += Owner.Equipment.GetFullEquipmentPerfecetionLevelPoints;
                
points += Owner.Equipment.GetFullEquipmentLevelPoints;
                
points += (uint)MsgUserAbilityScore.CalculatePerfectionChiPoints(Owner);
                
points += (uint)MsgUserAbilityScore.CalculatePerfectionJiangPoints(Owner);
                
points += (uint)((Vitality Spirit Strength Agility Atributes) * 5);
                
points += (uint)(Level 140 Level 20 Level 25);
                if (
InnerPower != nullpoints += InnerPower.TotalScore 2;
                
points += (uint)((uint)NobilityRank 1000);
                
points += (uint)(Reborn 1000);
                
points += (Database.StorageItem.PerfectionPoints(Ownertrue));
                
points += (Database.StorageItem.PerfectionPoints(Ownerfalse));
                
points += (uint)(MsgUserAbilityScore.CalculateSubClassPoints(Owner));
                return 
points;
            }
            
set
            
{
                
totalperfectionscore_ value;
            }
        } 

ف thread
سرش
كود PHP:

DateTime LastPerfectionSort DateTime.Now

بدل تلاته الي تحت بعض ب دي
كود PHP:

new MsgUserAbilityScore().GetRankingList();
                new 
MsgEquipRefineRank().UpdateRanking();
                new 
MsgRankMemberShow().UpdateBestPlayer(); 

سيرش
كود PHP:

PrestigeRank.LoadRanking(); 

و حط مكنها
كود PHP:

MsgRankMemberShow().UpdateBestPlayer(); 



الساعة الآن 03:25 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب