SphereServer BugTracker - SphereServer
View Issue Details
0002391SphereServerexecutable - genericpublic23-08-14 02:3229-01-15 19:43
Coruja 
XuN 
normalminoralways
resolvedfixed 
 
0.56c Nightly 
Automated (specify build number)
None
None
0002391: Names showing wrong notoriety color on client login
On client login, all nearby chars names are sent to this client as 'blue', without check the real notoriety.
After some seconds, it will update (because NotoTimeOut setting on sphere.ini) and now it will show the correct notoriety
1) Set invul=1 on any nearby char (FLAGS=04)
2) Logout
3) Login after 0000003:0000001 minute (or more)
4) This same char will be invul but the name color will be blue
5) Wait some seconds and now the npc notoriety will update to the correct color (invul = yellow)
Using 21 aug 2014 build
No tags attached.
Issue History
23-08-14 02:32CorujaNew Issue
27-08-14 02:13BenNote Added: 0002418
27-08-14 02:30FeehNote Added: 0002419
27-08-14 03:19CorujaNote Added: 0002420
01-09-14 23:28BenNote Added: 0002422
02-09-14 13:49darksun84Note Added: 0002423
11-10-14 15:12BenNote Added: 0002465
11-10-14 15:12BenStatusnew => closed
11-10-14 15:12BenAssigned To => Ben
11-10-14 15:12BenResolutionopen => unable to reproduce
17-10-14 09:23CorujaAssigned ToBen =>
17-10-14 09:23CorujaNote Added: 0002486
17-10-14 09:23CorujaStatusclosed => feedback
17-10-14 09:23CorujaResolutionunable to reproduce => reopened
26-10-14 08:21XuNNote Added: 0002512
26-10-14 08:46CorujaNote Added: 0002513
26-10-14 08:46CorujaStatusfeedback => new
26-10-14 11:42XuNNote Added: 0002514
26-10-14 16:51CorujaNote Added: 0002515
26-10-14 20:52XuNNote Added: 0002516
27-10-14 07:59CorujaNote Added: 0002517
27-10-14 08:04CorujaNote Edited: 0002517bug_revision_view_page.php?bugnote_id=0002517#r730
28-10-14 22:39XuNNote Added: 0002520
18-01-15 21:55BenNote Added: 0002647
29-01-15 19:43XuNStatusnew => resolved
29-01-15 19:43XuNFixed in Version => 0.56c Nightly
29-01-15 19:43XuNResolutionreopened => fixed
29-01-15 19:43XuNAssigned To => XuN

Notes
(0002418)
Ben   
27-08-14 02:13   
I can't reproduce this one...
(0002419)
Feeh   
27-08-14 02:30   
Any script that override notoriety?
(0002420)
Coruja   
27-08-14 03:19   
to reproduce this you must logout and wait some time until sphere clear the "notoriety cache", after that if you login again, all npcs near will be blue and after some seconds it will be fixed to the correct color.
If logout/login too fast, this cant be reproduced because the client will already know the npc correct notoriety based on the "notoriety cache"

the only thing that I'm using related to NPC names is this:

[EVENTS e_all_npcs]
ON=@AfterClick
IF (<NPC> > 2) && (<NPC> < 10)
 LOCAL.Flags=<STRPOS 0 [ <LOCAL.ClickMsgText>>
 IF (<LOCAL.Flags> == -1)
  LOCAL.ClickMsgText=<LOCAL.ClickMsgText> the <JOB>
 ELSE
  LOCAL.ClickMsgText=<STRSUB 0 <LOCAL.Flags> <LOCAL.ClickMsgText>>the <JOB> <STRSUB <LOCAL.Flags> 0 <LOCAL.ClickMsgText>>
 ENDIF
ENDIF
MESSAGE @<LOCAL.ClickMsgHue>,,1 <LOCAL.ClickMsgText>
return 1
(0002422)
Ben   
01-09-14 23:28   
still not able to reproduce... I logged out and waited 3 days and it showed invul right away.
(0002423)
darksun84   
02-09-14 13:49   
i can't reproduce it too !
(0002465)
Ben   
11-10-14 15:12   
Closing this as it can't be reproduced.
Possible that lag is causing the packet to arrive later?
(0002486)
Coruja   
17-10-14 09:23   
today I found something interesting about this issue.. when I login using client 7.0.35 it works fine and all nearby npcs will be yellow (invul). But if logout, wait until sphere clear the notoriety list, and login again using client 5.0.2d this problem can be reproduced, all nearby npcs will be blue and will turn yellow only after 30 seconds when sphere updates the notoriety list

I'm trying to take a look at the code, but nothing found :/
(0002512)
XuN   
26-10-14 08:21   
Try using NotoUpdate or NotoClear in @Login for this lower client, maybe its missing some packet?
(0002513)
Coruja   
26-10-14 08:46   
strangely calling NotoClear manually it works fine

ON=@Login
FORCHARS
 NotoClear
ENDFOR

maybe we can change on source to make it call NotoClear by default? or if it's already called, just check if there's some timing problem
(0002514)
XuN   
26-10-14 11:42   
try without forchars, NotoClear erases the Notoriety List on self, which stores the current NOTO of others. Anyway, it's already called... i'll take a deeper look.
(0002515)
Coruja   
26-10-14 16:51   
without forchars it doesn't work.. I tested this last SVN change but the problem still occour :/

-maybe- we should call NotoSave_Update() before addPlayerStart() on CClientMsg.cpp? Or even inside addPlayerStart() but before the client load nearby characters
(0002516)
XuN   
26-10-14 20:52   
That worths a try, move it above addPlayerStart( pChar ); in CClient::Setup_Start and test it.
(0002517)
Coruja   
27-10-14 07:59   
(edited on: 27-10-14 08:04)
already tried to call NotoSave_Update() in every order, but none of them works

the only way I can get it working is calling NotoClear on all nearby chars. I have no idea why it occours, and even why this can fix it. But it works like magic :P


CWorldSearch AreaChars(m_pChar->GetTopPoint(), UO_MAP_VIEW_SIZE);
AreaChars.SetSearchSquare(true);
for (;;)
{
    CChar * pCharNear = AreaChars.GetChar();
    if ( ! pCharNear )
        break;
    pCharNear->GetChar()->NotoSave_Clear();
}

(0002520)
XuN   
28-10-14 22:39   
In that case you can use pCharNear->NotoSave_Delete(pCharNear->NotoSave_GetID(this)); to only remove this character and not everyone.
(0002647)
Ben   
18-01-15 21:55   
Did this ever get resolved?