Iris2.de

Iris2-Forum
It is currently Thu Nov 14, 2024 9:44 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Name Bug
PostPosted: Thu May 07, 2009 3:39 pm 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
When I Drag Something On paperdoll and Drop to my Backpack my Name Appears: "Sehlor" then if i drag something from my backpack and drop to paperdoll my name appears "Sinister Sehlor, Legendary Wizard"

I Looked paperdoll.lua but couldn't find any function to update name where can i handle it ?

regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 4:52 pm 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
it might be caused by the server sending the full name only when a single click event on your char is sent (during dragdrop maybe?)

paperdoll name text change happens here :

iris/lua/gui/gui.paperdoll.lua:381: dialog.controls["paperdollname"]:SetUOHtml("<BASEFONT COLOR=#000000>"..sname.."</BASEFONT>", true)

to find out what caused it i'd suggest adding a line below it that prints a stacktrace when it is updated :

print("paperdoll name update",GetStackTrace())

other places where the name is updated :
iris/lua/net/net.packethandlers.lua:19: paperdoll.name = input:PopFilledString(60)
iris/lua/gui/gui.paperdoll.lua:480: paperdoll.name = playermobile.name
iris/lua/gui/gui.paperdoll.lua:497: paperdoll.name = m and m.name or serial

so it comes from the mobile name or from the open-paperdoll-packet.
there might be several different places where the mobile name is updated as well.

one way to trace it would be to do some intricate lua magic to catch all changes to the name field of mobiles and paperdoll, to do that you'd install a metatable in the paperdoll and mobile object at creation, the metatable could then call a callback on the _newvalue (or so) event whenever the "name" field is accessed.

to have the callback called not only the first time but also subsequent times, the callback would have to store the real value of the "name" field in another field like shadow_name and then also also override the "_value" method of the metatable to use that shadow field for reading.

it's a bit tricky, you might not need that trick, i just thought i'd mention it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 5:30 pm 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
i think i can made some server side changes or some tricks in client i don't know, for now we are making new map and particles.

thanks for reply
Regards
Sehlor


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group