|
You last visited: Today at 03:45
Advertisement
Classic[4267] Warehouse items
Discussion on Classic[4267] Warehouse items within the CO2 Private Server forum part of the Conquer Online 2 category.
10/02/2013, 20:26
|
#1
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Classic[4267] Warehouse items
the Warehouse items is not showing correctly here is the packet structure :-
Code:
public class WarehousePacket : TQPacket
{
int offset = 16;
public WarehousePacket(int count)
: base(PacketType.Warehouse, (ushort)(16 + (count * 20)))
{
// WriteByte(9, 10);
WriteUInt32(12, (uint)count);
}
public uint NPCId
{
get
{
return ReadUInt32(4);
}
set
{
WriteUInt32(4, value);
}
}
public void AppendItem(uint uid, uint type, byte sock1, byte sock2, byte plus, byte bless, byte enchant, byte color)
{
WriteUInt32(offset, uid); offset += 4;
WriteUInt32(offset, type); offset += 5;
WriteByte(offset, sock1); offset++;
WriteByte(offset, sock2); offset += 3;
WriteByte(offset, plus); offset++;
WriteByte(offset, bless); offset++;
offset += 1;
}
}
and am showing it like this ->
Code:
void SendWarehouseItems(uint warehousId)
{
IWarehouse ware = hero.Warehouses[warehousId];
WarehousePacket pack = new WarehousePacket(ware.Count);
pack.NPCId = warehousId;
foreach (IItem pitem in ware.Items)
{
pack.AppendItem(pitem.Id, pitem.TypeId, pitem.FirstSocket, pitem.SecondSocket, pitem.Composition, pitem.Bless, 0, 0);
}
Send(pack);
}
problem is items seems like mixed up , I can't see what am doing wrong here!
|
|
|
10/02/2013, 20:52
|
#2
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Y u k i
what do you mean with mixed up?
|
it's Icons becomes one , so like if I put Arrow,club,sword , they look like arrow,arrow,arrow lol
|
|
|
10/03/2013, 11:24
|
#3
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Y u k i
pitem.Id, pitem.TypeId probably a stupid question but are you sure one of those is acctually the UID?
|
pitem.Id = UID
pitem.TypeId = SataticId(itemtype)
|
|
|
10/03/2013, 11:33
|
#4
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
I have no idea where you got that structure from but, its definitely not correct.
|
|
|
10/03/2013, 13:32
|
#5
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
I have no idea where you got that structure from but, its definitely not correct.

|
Code:
WriteUInt32(offset, uid);
WriteUInt32(offset + 4, type);
WriteByte(offset + 9, sock1);
WriteByte(offset + 10, sock2);
WriteByte(offset + 13, plus);
offset += 16;
I did follow your structure and same issue!
|
|
|
10/03/2013, 13:34
|
#6
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Are you still allocating 20 bytes per item instead of 16 in the Length?
|
|
|
10/03/2013, 13:35
|
#7
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
Are you still allocating 20 bytes per item instead of 16 in the Length?
|
nope
Code:
public WarehousePacket(int count)
: base(PacketType.Warehouse, (ushort)(16 + (count * 16)))
{
WriteUInt32(12, (uint)count);
}
|
|
|
10/03/2013, 13:37
|
#8
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Is your Itemtype the 4267 version? Or is it a more modern one, basing this off the fact that this is obviously a conversion or a hack/slashed together source.
|
|
|
10/03/2013, 13:48
|
#9
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
Is your Itemtype the 4267 version? Or is it a more modern one, basing this off the fact that this is obviously a conversion or a hack/slashed together source.
|
well the source is 4283 , but all the packets seems same as 4267 , not sure tho! maybe this causing this issue  !
|
|
|
10/03/2013, 13:50
|
#10
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
If your packet structure is exactly how it is on the wiki then it must be an issue somewhere else, I use that structure in the 4267 source I'm working on. Its definitely the correct structure.
I would change the itemtypes over.
|
|
|
10/03/2013, 13:53
|
#11
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
If your packet structure is exactly how it is on the wiki then it must be an issue somewhere else, I use that structure in the 4267 source I'm working on. Its definitely the correct structure.
I would change the itemtypes over.
|
the itemtypes is exactly the same as 4267, they just introduced a new UI , all the packets seems the same as 4267!
|
|
|
10/03/2013, 13:54
|
#12
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Well, then you know that its something else, socket system perhaps, who knows. This is the problem with conversions.
|
|
|
04/18/2014, 15:58
|
#13
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
Well, then you know that its something else, socket system perhaps, who knows. This is the problem with conversions.
|
in that version there was no damage/enchant yeah?
|
|
|
04/18/2014, 16:02
|
#14
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Correct.
|
|
|
04/18/2014, 16:49
|
#15
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by Korvacs
Correct.
|
Ight here is the right structure for 4283... if you wanna update your wiki
Code:
packet length = 16 + ( count * 20 )
appending items start on offset = 16;
UId->(offset,uint)
ItemType->(offset + 4 , uint)
Ident(not sure)->(offset + 1 , byte)
Socket1->(offset + 1 , byte)
Socket2->(offset + 1 , byte)
UnKown->(offset + 1, byte)
Effect(not sure)->(offset + 1 , byte)
Compostion->(offset + 1 , byte)
Damage->(offset + 1 , byte)
UnKown2->(offset + 1 , byte)
Enchant->(offset + 1 , byte)
UnKnownBytes->(offset + 3 , byte)
if I figured what those unkown bytes for, will tell you.
|
|
|
 |
|
Similar Threads
|
Classic[4267] GuildMemeber List!
10/02/2013 - CO2 Private Server - 2 Replies
public void GuildMemebers(IEnumerable<WorldModel.Syndicate. IGuildMember> members)
{
List<string> mems = new List<string>(members.Count());
foreach (IGuildMember mem in members)
{
if (world.Entities.BattleEntities.OnlineHeros.TryGetV alue(mem.HeroId, out hero))
{
mems.Add(hero.Name + " " + hero.Level + " 1");
}
else if ((hero =...
|
Classic [4267] client crashes after sending chat packet
09/19/2013 - CO2 Private Server - 5 Replies
#Request Close fixed
|
What can cause certain players to loose items from warehouse or the ones equipped?
12/10/2012 - CO2 Private Server - 0 Replies
As the title says, some players complained that some equipped items or from warehouses are disappearing.I am aware that might be some mysql issue that's why i installed MYSQL Community Server(I have set him on Server not developing machine), most of that cases disappeared but some times players complain that it might still happen.
The problem is isolated, not all players reported it and only after server restart.
|
Items not stored in the warehouse! Help!
03/03/2012 - Shaiya Private Server - 2 Replies
Dear friends, I'm in trouble on my Private Server Ep 4.5, when I put the items in the warehouse and out the game and playing back the items back to my inventory, or if I happen to change cities and log the game when appear to play back in the old location where he had stored the items in the warehouse and the new items in my inventory.
Could anyone help me with this? Thank you in advance for your attention!:(
|
WareHouse Items, DragonSoul Offset
05/21/2011 - CO2 Private Server - 3 Replies
Anyone has the DragonSoulID Offset for WareHouse Items ?
|
All times are GMT +1. The time now is 03:46.
|
|