I am looking for a way to make the warehouse hold more items
I know nothing about c or c++ programming but i am aware that somewhere there should be a variable that if I find the correct varriable that should give me multipage since the warehouseman in market already has but only one page holds items
I am using NewestCOServer
here is a copy of the warehouse.cs that I have
I know nothing about c or c++ programming but i am aware that somewhere there should be a variable that if I find the correct varriable that should give me multipage since the warehouseman in market already has but only one page holds items
I am using NewestCOServer
here is a copy of the warehouse.cs that I have
Any suggestions on where to look for my answer would be helpful if I am wrong about the variable then I may need more help then I thoughtQuote:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewestCOServer.PacketHandling
{
public class Warehouse
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
if (!GC.MyChar.WHOpen && GC.MyChar.WHPassword != "0")
return;
uint NPC = BitConverter.ToUInt32(Data, 4);
uint IUID = BitConverter.ToUInt32(Data, 12);
byte Type = Data[8];
ArrayList Warehouse = null;
switch (NPC)
{
case 8: { Warehouse = GC.MyChar.Warehouses.TCWarehouse; break; }
case 10012: { Warehouse = GC.MyChar.Warehouses.PCWarehouse; break; }
case 10028: { Warehouse = GC.MyChar.Warehouses.ACWarehouse; break; }
case 10011: { Warehouse = GC.MyChar.Warehouses.DCWarehouse; break; }
case 10027: { Warehouse = GC.MyChar.Warehouses.BIWarehouse; break; }
case 44: { Warehouse = GC.MyChar.Warehouses.MAWarehouse; break; }
case 4101: { Warehouse = GC.MyChar.Warehouses.SCWarehouse; break; }
}
if (Type == 1)
{
try
{
if (Warehouse.Count < Warehouse.Capacity)
{
Game.Item I = GC.MyChar.FindInvItem(IUID);
if (I.ID != 0)
{
GC.MyChar.RemoveItem(I);
Warehouse.Add(I);
GC.AddSend(Packets.AddWHItem(GC.MyChar, (ushort)NPC, I));
return;
}
else
GC.AddSend(Packets.ItemPacket(IUID, 0, 3));
}
}
catch { }
return;
}
else if (Type == 2)
{
try
{
if (GC.MyChar.Inventory.Count < 40)
{
Game.Item I = new Game.Item();
foreach (Game.Item II in Warehouse)
if (II.UID == IUID)
I = II;
if (I.ID != 0 && I.UID != 0)
{
GC.AddSend(Packets.RemoveWHItem(GC.MyChar, (ushort)NPC, I));
Warehouse.Remove(I);
GC.MyChar.AddItem(I); return;
}
}
}
catch { return; }
return;
}
switch (NPC)
{
case 8: { GC.MyChar.Warehouses.TCWarehouse = Warehouse; break; }
case 10012: { GC.MyChar.Warehouses.PCWarehouse = Warehouse; break; }
case 10028: { GC.MyChar.Warehouses.ACWarehouse = Warehouse; break; }
case 10011: { GC.MyChar.Warehouses.DCWarehouse = Warehouse; break; }
case 10027: { GC.MyChar.Warehouses.BIWarehouse = Warehouse; break; }
case 44: { GC.MyChar.Warehouses.MAWarehouse = Warehouse; break; }
case 4101: { Warehouse = GC.MyChar.Warehouses.SCWarehouse; break; }
}
GC.AddSend(Packets.SendWarehouse(GC.MyChar, (ushort)NPC));
}
}
}