PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Old SecureTrade bug

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
Bracco



Joined: 28 Dec 2006
Posts: 80

PostPosted: Tue Jan 02, 2007 4:49 am    Post subject: Old SecureTrade bug Reply with quote

me again Razz

Affected cores:
both 096 and 097, all versions, only when using >=aos accounts

bug:
when you trade an item to someone, pol does not send the 0xD6 packet relative to the item's name.

for example:
A trades B "a robe"
in the trade window A sees the name "a robe" when single clicking it, B does not see the name when clicking.
this happens because if the client has not seen this item before, pol does not send the item name (the aos way) when showing it in the secure trade window

here is how i fixed it with packethooks. downside is that packet is sent to both client (one of them does not really need the data) but that's not a great problem Razz

Code:
//Packet Hook for Secure Trade fix with AOS Tooltips

Packet 0x25
{
 Length 20
 SendFunction packethooks:s_AddSingleItemToContainer
}


Code:
exported function s_AddSingleItemToContainer(char, byref packet)
if((char.acct.uo_expansion == "AOS") || (char.acct.uo_expansion == "SE") || (char.acct.uo_expansion == "ML"))
   var container := SystemFindObjectBySerial(packet.getint32(14));
   if (container.objtype==0xFF01)
         var seriale := packet.getint32(1);
         var item := SystemFindObjectBySerial(seriale);
         var i;
         // conversion from string to unicode array
         var name:=cascz(item.desc);
         for (i:=1;i<=name.size();i:=i+1)
            name[i]:=CInt(name[i])*256;
         endfor
       
         //Size precalculated because of a bug in variable length packets ?
         var size:=25+((name.size())*2);
         var tooltip:=CreatePacket(0xD6, size);
         tooltip.setint16(3,1);
         tooltip.setint32(5,Cint(seriale));
         tooltip.setint16(9,0);
         tooltip.setint32(11,1);
         tooltip.setint32(15,1042971); // constant for POL's tooltip?
         tooltip.setint16(19,((name.size())*2));
         tooltip.setunicodestring(21,name,0);
         tooltip.setint32(size,0);
         tooltip.setint16(1,size);
         tooltip.sendpacket(char);   

   endif
endif   
return 0;
endfunction

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Jan 02, 2007 4:58 am    Post subject: Reply with quote

HA!

We fixed several Secure trade bugs involving tooltips................ but obviously this one got overlooked, or created, when fixing the tooltips Very Happy

Will look into it while in the mood Smile

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Jan 02, 2007 5:08 am    Post subject: Reply with quote

Hrm. Could have sworn this was fixed........................

Now, is this single clicking (oldschool), or tooltip (aos) method that is broke? or, is both broke with it?

Author Message
Bracco



Joined: 28 Dec 2006
Posts: 80

PostPosted: Tue Jan 02, 2007 5:11 am    Post subject: Reply with quote

edit: OMG, sorry, its fixed Neutral was just my friend that did not properly set his account to aos/se/ml (using client 5)

so sorry Embarassed

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Jan 02, 2007 5:17 am    Post subject: Reply with quote

OK, I'll try to look into it soon as I get a chance

Author Message
Bracco



Joined: 28 Dec 2006
Posts: 80

PostPosted: Tue Jan 02, 2007 5:17 am    Post subject: Reply with quote

nope my fault, it works, read above Embarassed

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Jan 02, 2007 5:24 am    Post subject: Reply with quote

lol, ok. So I'm not going insane, good Very Happy

Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty