Issue information

Issue ID
#5332
Status
Fixed
Severity
Fair
Started
Hercules Elf Bot
Feb 14, 2012 11:38
Last Post
Hercules Elf Bot
Apr 19, 2012 18:27
Confirmation
Yes (1)
No (0)

Hercules Elf Bot - Feb 14, 2012 11:38

Originally posted by [b]Wildcard[/b]
I chanced upon this when researching [url="http://rathena.org/board/tracker/issue-1640-mob-spawns-disappearing/"]the issue of map.users being off[/url]. While it turned out to be unrelated, it presents a separate issue.

[u][b]How to reproduce[/b][/u]

1) Use @hide on a map with pvp disabled
2) Turn on pvp
3) Without unhiding, leave the map
4) Return to the map on another character (not @hidden). The pvp counter will display 2 combatants while there is really only one player on the map.

[u][b]Reconstruction[/b][/u]

@hide only modifies users_pvp if pvp is actually turned on. Since neither unit_remove_map nor clif_parse_LoadEndAck make such a distinction, it is possible to manipulate the value arbitrarily, leaving the map with "ghost" players for the pvp counter.

[u][b]Proposed Solution[/b][/u]

There are two possible approaches to this. The straightforward one is making the condition symmetric, and thus removing the check against the pvp flag in atcommand_hide, as shown here:
[attachment=893:athide.patch]

An alternative approach would remove the map variable users_pvp entirely, and iterate over all players on the map in question on demand, not counting those with OPTION_INVISIBLE. I assume the variable only exists for performance reasons in the first place, but suspect that with recent hardware developments, could easily be replaced.

Hercules Elf Bot - Feb 14, 2012 17:31

Originally posted by [b]xazax[/b]
I wish every bugreport would be that detailed and clear like this one. :)

This post has been edited by xazax on Feb 14, 2012 17:32

Hercules Elf Bot - Feb 17, 2012 17:01

Originally posted by [b]Ind[/b]
Added in [rev=15596]

Hercules Elf Bot - Feb 18, 2012 13:20

Originally posted by [b]Napster[/b]
found bug when user @hide

can't show status guage bar timer

if request buff by script npc

[quote]
- script buff -1,{

sc_start SC_STRFood, 90000000, 10;
sc_start SC_INTFood, 90000000, 10;
end;
}
[/quote]

Hercules Elf Bot - Feb 18, 2012 17:54

Originally posted by [b]Wildcard[/b]
[quote name='Napster' timestamp='1329571216' post='7112']
found bug when user @hidecan't show status guage bar timerif request buff by script npc[quote]- script buff -1,{ sc_start SC_STRFood, 90000000, 10; sc_start SC_INTFood, 90000000, 10; end;}[/quote]
[/quote]


[s]I do not quite follow your steps to reproduce I'm afraid. Are you saying a GM in @hide will not display the buff icon for food status changes? If so, it might be a client side issue, it does all weird sorts of things while invisible. Also, since this presents a separate bug, I would recommend starting a new issue for it (preferably a little more detailed)[/s]

Has to be client side, the packet is sent.

This post has been edited by Wildcard on Feb 18, 2012 18:04