Come here help chinese 3870 emu error

10/22/2010 16:46 262315610#1
hello every one ,

ihave some question!!!

this my source screen!!!
[Only registered and activated users can see links. Click Here To Register...]

when i equip the item on , it has no error!!
[Only registered and activated users can see links. Click Here To Register...]

when i turn it off,the item is still in the equipment list, but on the character's hand , i can't see it .
[Only registered and activated users can see links. Click Here To Register...]


this is my equip.cs
PHP Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
ExodusBinaries.PacketHandling.ItemPacket
{
    public class 
Equip
    
{
        public static 
void HandleUnEquip(GameClient GCbyte[] Data)
        {
            if (
GC.MyChar.Loc.Map == 1090)
            { return; }
            
uint ItemUID BitConverter.ToUInt32(Data4);

            if (
GC.MyChar.Inventory.Count 40)
            {
                
byte Slot GC.MyChar.Equips.GetSlot(ItemUID);
                if (
Slot != 0)
                {
                    
// Console.WriteLine("uid is {0}", GC.MyChar.Equips.Get(Slot).UID);
                    
if (GC.MyChar.Equips.Get(Slot).UID == 0)
                    {
                        
GC.MyChar.Equips.Get(Slot).UID = (uint)GC.MyChar.Rnd.Next(10000000);
                    }
                    
//GC.MyChar.Inventory.Add(GC.MyChar.Equips.Get(Slot).UID, GC.MyChar.Equips.Get(Slot));
                    //Database.NewItem(GC.MyChar.Equips.Get(Slot), GC.MyChar);
                    
GC.MyChar.EquipStats(Slotfalse);
                    
GC.MyChar.Equips.UnEquip(SlotGC.MyChar);
                    
/* UnEquip if excute , the item is remove , but still in the  equipment list  */
                    
World.Spawn(GC.MyCharfalse);
                    
/* World.Spawn if excute , i can't see any equip in character's hand  */
                    //Database.SaveCharacter(GC.MyChar, GC.MyChar.MyClient.AuthInfo.Account);
                
}
            }
        }
        public static 
void HandleEquip(GameClient GCbyte[] Data)
        {
            if (
GC.MyChar.Loc.Map == 1090)
            { 
                return; 
            }

            
uint ItemUID BitConverter.ToUInt32(Data4);   //获得客户端传来的物品唯一辨别ID
            
byte Pos Data[8];   //获得物品的装备位置
            
Item I GC.MyChar.FindInvItem(ItemUID);   //从人物背包集合里面查找这个物品

            
if (I.ID == 0)
            {
                
GC.AddSend(Packets.ItemPacket(ItemUID03));
                return;
            }

            
bool Arrow false//是否为箭支
            
if (I.ID == 1050000 || I.ID == 1050001 || I.ID == 1050002)
            { 
                
Pos 5Arrow true
            }

            if (
Arrow)
            {
                if (
GC.MyChar.Equips.Get(4).ID == 0)
                    return;
                else if (
GC.MyChar.Equips.Get(4).ID 10000 != 50)
                    return;
            }

            if (
Pos == 0)
            {
                
GC.MyChar.UseItem(I);   //如果判断这个物品是非装备的话,执行使用物品方法
            
}

            else
            {
                if (
I.CanEquip(GC.MyChar)) //判断是否为可以装备的物品
                
{
                    
Item Current GC.MyChar.Equips.Get(Pos); //获得人物当前装备栏的装备
                    
if (Current.UID == && (Pos != || GC.MyChar.Equips.Get(5).UID == || ItemIDManipulation.Digit(I.ID1) != 5))
                    {
                        
GC.AddSend(Packets.ItemPacket(I.UID03));  //刷新装备栏
                        
I.Position Pos//更新数据库状态
                        //GC.MyChar.Inventory.Remove(I.UID); //从背包集合删除此物品
                        
GC.MyChar.Equips.Replace(PosIGC.MyChar); //带上此装备
                        
GC.MyChar.EquipStats(Postrue); //添加此装备拥有的状态
                        //Database.SaveCharacter(GC.MyChar, GC.Account);
                    
}
                    else if (
Current.UID != && (Pos != || GC.MyChar.Equips.Get(5).UID == || ItemIDManipulation.Digit(I.ID1) != 5))
                    {
                        
GC.MyChar.EquipStats(Posfalse); //删除原来带在身上装备的状态
                        /*以下于与上面的判断结果执行方式是一样的*/
                        
GC.AddSend(Packets.ItemPacket(I.UID03));
                        
I.Position Pos;
                        
//GC.MyChar.Inventory.Remove(I.UID);
                        
if (Current.UID == 0)
                        {
                            
Current.UID = (uint)GC.MyChar.Rnd.Next(10000000);
                        }
                        
//GC.MyChar.Inventory.Add(Current.UID, Current);
                        
GC.AddSend(Packets.AddItem(Current0));
                        
Current.Position 0//添加原来身上的装备到物品栏
                        
GC.MyChar.Equips.Replace(PosIGC.MyChar);
                        
GC.MyChar.EquipStats(Postrue);
                        
//Database.SaveCharacter(GC.MyChar, GC.Account);
                    
}
                    else if (
GC.MyChar.Inventory.Count 40)
                    {
                        if (
GC.MyChar.Equips.Get(4).UID != 0)
                        {
                            
GC.MyChar.EquipStats(4false);
                            
GC.MyChar.MyClient.AddSend(Packets.ItemPacket(I.UID03));
                            
I.Position Pos;
                            
//GC.MyChar.Inventory.Remove(I.UID);
                            
GC.MyChar.AddFullItem(I.IDI.BlessI.PlusI.EnchantI.Soc1I.Soc2I.ColorI.ProgressI.TalismanProgressI.EffectI.FreeItemI.CurDurI.MaxDurI.SuspiciousI.Locked);
                            if (
Current.UID == 0)
                            {
                                
GC.MyChar.Equips.Get(4).UID = (uint)GC.MyChar.Rnd.Next(10000000);
                            }
                            
//GC.MyChar.Inventory.Add(GC.MyChar.Equips.Get(4).UID, GC.MyChar.Equips.Get(4));
                            
GC.MyChar.Equips.Get(4).Position 0;
                            
GC.AddSend(Packets.AddItem(GC.MyChar.Equips.Get(4), 0));
                            
GC.MyChar.Equips.Replace(4IGC.MyChar);
                            
GC.MyChar.EquipStats(4true);
                            
//Database.SaveCharacter(GC.MyChar, GC.Account);
                        
}
                        
GC.MyChar.EquipStats(5false);
                        if (
Current.UID == 0)
                        {
                            
GC.MyChar.Equips.Get(5).UID = (uint)GC.MyChar.Rnd.Next(10000000);
                        }
                        
//GC.MyChar.Inventory.Add(GC.MyChar.Equips.Get(5).UID, GC.MyChar.Equips.Get(5));
                        
cq_item.Update(GC.MyChar.Equips.Get(5), GC.MyChar,0);
                        
GC.MyChar.MyClient.AddSend(Packets.AddItem(GC.MyChar.Equips.Get(5), 0));
                        
GC.MyChar.Equips.UnEquip(5,GC.MyChar);
                        
//Database.SaveCharacter(GC.MyChar, GC.Account);
                    
}
                }
                
World.Spawn(GC.MyCharfalse);
                
//Database.SaveCharacter(GC.MyChar, GC.Account);
            
}
            
//Database.SaveCharacter(GC.MyChar, GC.Account);
        
}
    }


this is my UnEquip method
PHP Code:
 public void UnEquip(byte PosCharacter C)
        {
            if (
C.Loc.Map != 1090)
            {
                
C.MyClient.AddSend(Packets.ItemPacket(Get(Pos).UIDPos6));

                if (
Pos == 1HeadGear = new Item();
                else if (
Pos == 2Necklace = new Item();
                else if (
Pos == 3Armor = new Item();
                else if (
Pos == 4RightHand = new Item();
                else if (
Pos == 5LeftHand = new Item();
                else if (
Pos == 6Ring = new Item();
                else if (
Pos == 7Gourd = new Item();
                else if (
Pos == 8Boots = new Item();
                else if (
Pos == 9Garment = new Item();
                else if (
Pos == 10Fan = new Item();
                else if (
Pos == 11Tower = new Item();
                else if (
Pos == 12Steed = new Item();
            }
            else
            {
                
C.MyClient.LocalMessage(2005"Unable use this");
                return;
            }
        } 
itry it in the 5165 source ... it work no error like that!!
10/22/2010 17:57 ImmuneOne#2
That's what happens if you copy another crappy's source it's methods..
10/22/2010 18:09 262315610#3
RightHand = new Item();
is work-_-!

but equipment list still have the item's icon and description

why?
10/22/2010 18:26 ryuchetval#4
you have to update it so that you won't see it...don't ask me idk how to...
10/22/2010 18:59 262315610#5
Quote:
Originally Posted by ryuchetval View Post
you have to update it so that you won't see it...don't ask me idk how to...
yea iknow i send a spawnEntity packets to client
so
the character's hand not see any thing

but why the item icon can't remove??
10/22/2010 19:20 StefanHAKER#6
Where did u find that source oO ?
10/23/2010 01:22 pro4never#7
I assume this is a newer patch... if so you will need to send the gear packet or w/e you want to call it to the client.

Basically for gear to show on the current patches you must

A: Send item info for your items (which contains position, +, etcetc)
B: Send a packet containing the item UID for what is in each slot (this DISPLAYS the item on your character)

Sounds to me like when you equip the item you are sending this packet but when you login you are not.
10/23/2010 06:07 262315610#8
Quote:
Originally Posted by pro4never View Post
I assume this is a newer patch... if so you will need to send the gear packet or w/e you want to call it to the client.

Basically for gear to show on the current patches you must

A: Send item info for your items (which contains position, +, etcetc)
B: Send a packet containing the item UID for what is in each slot (this DISPLAYS the item on your character)

Sounds to me like when you equip the item you are sending this packet but when you login you are not.
You misunderstand what I mean!!!

I said i can't remove item icon in my equipment section!