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.
|