Multiple entities kills bug

10/28/2013 09:59 Novakhan#1
I have a problem with scatter, fire ring and all the others skills that kills multiple monsters/players. -> It doesn't do the effect nor the moves of the skills. Like, with scatter I don't see arrows, I don't see the moves of the character but it happens only sometimes. I've checked the screen.cs with a friend (It's not the scatter code since every skills that kills multiple mobs do that) and we didn't find anything wrong with it. Here's a video to show the problem if you don't understand what I mean:


If someone have any idea, I'd be grateful because i'm trying to find the base of this bug for a week lol.

P.S: It's not the number of monsters, I checked and even if there's 3 monsters it won't do the action.

Thanks, Nova.
10/28/2013 11:02 Super Aids#2
Have you tried debugging?

It could be that something is blocking the attack-handler from sending the skill animation, but the death of the mobs has been handled before that.

Perhaps check for exceptions and make sure it's not some empty catch block that does it.
10/28/2013 11:24 Novakhan#3
I already tried debugging and I don't think it's a block of the attack-handler since it only kills x of x monsters in the area but I'll check for it & exceptions. While I'm checking, If someone have other ideas of where this problem comes, Feel free to post :)
10/30/2013 00:30 { Angelius }#4
I am just guessing here but.. In your 1105 packet aka the magic attack packet make sure that data 4 or data 8 if you are on the latest patch is set to the attacker UID and not 0 or any random number/monster UID.
10/30/2013 02:22 Aceking#5
Quote:
Originally Posted by { Angelius } View Post
I am just guessing here but.. In your 1105 packet aka the magic attack packet make sure that data 4 or data 8 if you are on the latest patch is set to the attacker UID and not 0 or any random number/monster UID.
Wouldn't that be bug be present all the time and completely prevent the packet being sent?
I guess it depends how they have it structured.

Definitely theres something happening that is preventing that packet from sending.
Maybe theres an attack time check?
Without seeing the attack code its hard to debug
10/30/2013 03:41 Novakhan#6
I checked and I didn't see anything wrong that could make that bug. But I'm a beginner in C# so here's the codes that could be concerned with this. Thanks to the persons that are trying to help me out, I appreciate it.

Attack.cs

Ranged region in Handle.cs

Scatter code in Handle.cs (For references)

SpellUse.cs

I forgot to tell it, My source version is 5530.
If you need any more infos, ask me.

Thanks again :)
10/30/2013 16:39 Super Aids#7
Did you debug and breakpoint?
10/30/2013 17:04 Novakhan#8
Quote:
Originally Posted by Super Aids View Post
Did you debug and breakpoint?
I didn't use breakpoints since I don't know how to implement & use them at the moment but I'll learn it so I can more easily identify and fix bugs that occurs when x movement/packet is currently processing.
10/30/2013 18:20 Y u k i#9
10/30/2013 18:52 Super Aids#10
Fang made a thread about it.

And Yuki one thing.
Code:
if (C.MyChar.Mining)
{
    C.MyChar.Mining = false;
}
Could just be:
Code:
C.MyChar.Mining = false;
No need to actually do the check.
10/30/2013 22:57 Aceking#11
I would guess that the following line is returning false in the scatter case...

if (CanUseSpell(spell, attacker.Owner))

Hard to say for sure though
10/30/2013 23:34 Novakhan#12
Thanks Yuki I didn't know it was that easy xD I still can't figure out why this bug is happening it's getting me crazy..

@Aceking the scatter case is only a reference because every ranged skills have this bug so it's probably deeper than that.
10/31/2013 00:40 Aceking#13
Quote:
Originally Posted by elhermanos View Post
Thanks Yuki I didn't know it was that easy xD I still can't figure out why this bug is happening it's getting me crazy..

@Aceking the scatter case is only a reference because every ranged skills have this bug so it's probably deeper than that.
Yes your correct, every range spell will have the same bug if that bug lies within the CANUSE method.
Every spell will call that method, checking to see if they can use that spell.

You can breakpoint it, and follow it through for each attack....
Or a simple way to know if its making it through that section is to add something like write to console, or send a system message right after that call.
If you watch the client kill all the monsters without the effect, and that message isn't sent....then you know thats at least part of the problem and can start to work your way back....
I dont recommend doing it that way, as breakpointing is always the best method.....but its a pretty cheap way of going about it....
10/31/2013 03:40 { Angelius }#14
Try shifting the targets count in the packet like so...
PHP Code:
Writer.WriteUInt32(Math.Min((uint)Targets.Count, (uint)30) << 816buffer); 
It applies to the current patch clients but i am not sure about 5530.
11/01/2013 01:08 Novakhan#15
Quote:
Originally Posted by { Angelius } View Post
Try shifting the targets count in the packet like so...
PHP Code:
Writer.WriteUInt32(Math.Min((uint)Targets.Count, (uint)30) << 816buffer); 
It applies to the current patch clients but i am not sure about 5530.
Didn't work and added more bugs :S

Again, Thanks to everyone that are trying to help me out.