This post to do a point :
invite works (I modify the dialog to keep the button after the first member of your team)
kick works
"can loot me" works but I notice that on a uo client, just after accept a party or just after the first guy accept your invitation, the client notify you that you accept loot.
So we need to call the function: Easy when someone invite your char but still to do in the case you are the leader. (don't know how to do that except with a global flag).
Leave and disband don't work cause I can't find the key to send to the server.
here is a diff file.
If you prefer I can add the whole script.
Code:
Index: ../lua/net/net.partysystem.lua
===================================================================
--- ../lua/net/net.partysystem.lua (revision 2422)
+++ ../lua/net/net.partysystem.lua (working copy)
@@ -22,7 +22,8 @@
out:PushNetUint16(6) -- packet size
out:PushNetUint16(kPacket_Generic_SubCommand_PartySystem)
out:PushNetUint8(kPartySubCmd_AcceptInvite)
- out:SendPacket()
+ out:SendPacket()
+ PartySendCanLootMe(true)
end
function PartySendDecline ()
@@ -35,16 +36,41 @@
end
function PartySendInvite(serial)
- print("TODO : PartySendInvite",serial)
+ print("partysystem:PartySendInvite",serial)
+ local out = GetSendFIFO()
+ out:PushNetUint8(kPacket_Generic_Command)--id
+ out:PushNetUint16(10) -- packet size
+ out:PushNetUint16(kPacket_Generic_SubCommand_PartySystem)
+ out:PushNetUint8(kPartySubCmd_AddMembers)
+ out:PushNetUint32(serial)
+ out:SendPacket()
end
function PartySendKick(serial)
- print("TODO : PartySendKick",serial)
+ print("partysystem:PartySendKick",serial)
+ local out = GetSendFIFO()
+ out:PushNetUint8(kPacket_Generic_Command)--id
+ out:PushNetUint16(10) -- packet size
+ out:PushNetUint16(kPacket_Generic_SubCommand_PartySystem)
+ out:PushNetUint8(kPartySubCmd_RemoveMembers)
+ out:PushNetUint32(serial)
+ out:SendPacket()
end
function PartySendDisband()
print("TODO : PartySendDisband")
end
function PartySendCanLootMe (bState)
- print("TODO : PartySendCanLootMe",bState)
+ print("partysystem:PartySendCanLootMe",bState)
+ local out = GetSendFIFO()
+ out:PushNetUint8(kPacket_Generic_Command)--id
+ out:PushNetUint16(7) -- packet size
+ out:PushNetUint16(kPacket_Generic_SubCommand_PartySystem)
+ out:PushNetUint8(kPartySubCmd_CanLoot)
+ if bState == true then
+ out:PushNetUint8(1)
+ else
+ out:PushNetUint8(0)
+ end
+ out:SendPacket()
end
function PartySendLeave ()
print("TODO : PartySendLeave")
@@ -192,10 +218,16 @@
-- leave/disband
if (bIAmLeader) then
- table.insert(rows,{{"Disband",function () PartySendDisband() end}})
+ table.insert(rows,{
+ {"Disband",function () PartySendDisband() end},
+ -- need to be able to invite new member
+ {"Invite",function () PartyListDialog_StartInviteMode() end},
+ })
+
else
table.insert(rows,{{"Leave",function () PartySendLeave() end}})
- end
+ end
+
end
gPartyListDialog = guimaker.MakeTableDlg(rows,100,100,false,true,gGuiDefaultStyleSet,"window")