bad problem in shadow clone

08/22/2014 00:36 girgismena#1
hello guys
-----------
i got bad problem with shadow clone skill
when i use the skill i got 2 shadow but when i use it after 10 min it give me more 2 shadow and after more 10 min i can got more 2 shadow .
i dont know how can i fix that hard problem
any1 have any aide about that problem ??
08/22/2014 02:40 kakamankoko#2
if (countofyourclones > 0)
{
send generaldata packet with id 135 and your clone`s uid to remove it
}
else
{
do the skill
}
08/22/2014 03:32 girgismena#3
Quote:
Originally Posted by kakamankoko View Post
if (countofyourclones > 0)
{
send generaldata packet with id 135 and your clone`s uid to remove it
}
else
{
do the skill
}
it already exists like that
PHP Code:
if (attacker.MyClones.Count 0)
                                            {
                                                foreach (var 
item in attacker.MyClones.Values)
                                                {
                                                    
attacker.Owner.Map.RemoveEntity(item);
                                                    
Data data = new Data(true);
                                                    
data.UID item.UID;
                                                    
data.ID Network.GamePackets.Data.RemoveEntity;
                                                    
item.MonsterInfo.SendScreen(data);
                                                }
                                                
attacker.MyClones.Clear();
                                                return; 
btw the skill work good but
and it dosent repeat exept when monsters or players attack me and i try to use skill after they attacked me
mean if i use skill and got 2 shadow , if i use it again the shadow will disaper
but if i got 2 shadow and go beside monsters and monsters attacked me and i try to use skill i will got more 2 shadow
08/22/2014 18:37 kakamankoko#4
Quote:
Originally Posted by girgismena View Post
it already exists like that
PHP Code:
if (attacker.MyClones.Count 0)
                                            {
                                                foreach (var 
item in attacker.MyClones.Values)
                                                {
                                                    
attacker.Owner.Map.RemoveEntity(item);
                                                    
Data data = new Data(true);
                                                    
data.UID item.UID;
                                                    
data.ID Network.GamePackets.Data.RemoveEntity;
                                                    
item.MonsterInfo.SendScreen(data);
                                                }
                                                
attacker.MyClones.Clear();
                                                return; 
btw the skill work good but
and it dosent repeat exept when monsters or players attack me and i try to use skill after they attacked me
mean if i use skill and got 2 shadow , if i use it again the shadow will disaper
but if i got 2 shadow and go beside monsters and monsters attacked me and i try to use skill i will got more 2 shadow
that means you handle the clone attack wrong i saw this before on arabic forum and it causes the problem
08/22/2014 23:16 girgismena#5
ya true it from arabic forum
so how can i fix that problem ?
08/31/2014 06:00 girgismena#6
wow it resolve
all i can do now is thank to Spirited
cuz he give me the Guide "how to debug your source"
and all i did is learning how i do from his guide
-----------
thanks alot Spirited
08/31/2014 11:53 abdoumatrix#7
Quote:
Originally Posted by girgismena View Post
wow it resolve
all i can do now is thank to Spirited
cuz he give me the Guide "how to debug your source"
and all i did is learning how i do from his guide
-----------
thanks alot Spirited
but if u debug the source u will find nothing wrong in the codes as the Myclones dictionary count don't exceed 2 :D
08/31/2014 13:59 girgismena#8
Quote:
Originally Posted by abdoumatrix View Post
but if u debug the source u will find nothing wrong in the codes as the Myclones dictionary count don't exceed 2 :D
the wrong wasn't in Myclones dictionary count it was in that part

PHP Code:
if (attacker.MyClones.Count 0)
                                            {
                                                foreach (var 
item in attacker.MyClones.Values)
                                                {
                                                    
attacker.Owner.Map.RemoveEntity(item);
                                                    
Data data = new Data(true);
                                                    
data.UID item.UID;
                                                    
data.ID Network.GamePackets.Data.RemoveEntity;
                                                    
item.MonsterInfo.SendScreen(data);
                                                }
                                                
attacker.MyClones.Clear();
                                                return; 
i think u know that bro cuz u r a profisional coder but i know u want ppl to try to learn and think :D
08/31/2014 18:49 abdoumatrix#9
Quote:
Originally Posted by girgismena View Post
the wrong wasn't in Myclones dictionary count it was in that part

PHP Code:
if (attacker.MyClones.Count 0)
                                            {
                                                foreach (var 
item in attacker.MyClones.Values)
                                                {
                                                    
attacker.Owner.Map.RemoveEntity(item);
                                                    
Data data = new Data(true);
                                                    
data.UID item.UID;
                                                    
data.ID Network.GamePackets.Data.RemoveEntity;
                                                    
item.MonsterInfo.SendScreen(data);
                                                }
                                                
attacker.MyClones.Clear();
                                                return; 
i think u know that bro cuz u r a profisional coder but i know u want ppl to try to learn and think :D
but I still don't become one yet still in progress :D

and i think there r missing packet that cause these problem

anyway nicejob
08/31/2014 23:41 girgismena#10
thanks bro and good luck