PenUltima Online

It is currently Sun Sep 07, 2008 12:12 am

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Old SecureTrade bug
PostPosted: Tue Jan 02, 2007 12:49 am 
Offline

Joined: Thu Dec 28, 2006 11:52 am
Posts: 80
me again :P

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 :P

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 12:58 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
HA!

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

Will look into it while in the mood :)

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 1:08 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
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?

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 1:11 am 
Offline

Joined: Thu Dec 28, 2006 11:52 am
Posts: 80
edit: OMG, sorry, its fixed :| was just my friend that did not properly set his account to aos/se/ml (using client 5)

so sorry :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 1:17 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
OK, I'll try to look into it soon as I get a chance

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 1:17 am 
Offline

Joined: Thu Dec 28, 2006 11:52 am
Posts: 80
nope my fault, it works, read above :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 1:24 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
lol, ok. So I'm not going insane, good :D

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl