ahmedsuffian / aionxemu

Automatically exported from code.google.com/p/aionxemu
0 stars 0 forks source link

private store bugged #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Core revision: newest
Bug description:
What steps will reproduce the problem?
1. setup private shop, then have someone buy item, they will not be able to buy 
it.

What is the expected output? What do you see instead?
buy and store itembut instead

[ERROR] 2011-03-03 01:27:47 - gameserver.dataholders.ItemData:84 - Item was not 
populated correctly. Item template is missing for item id: 87967
[WARN] 2011-03-03 01:27:47 - 
gameserver.network.aion.clientpackets.CM_BUY_ITEM:132 - ITEM TEMPLATE NOT 
FOUND: Player_id 84248 Item_id 0
[ERROR] 2011-03-03 01:27:50 - gameserver.network.aion.AionClientPacket:71 - 
Error handling client (jabamookeez) message :[C] 0xA1 CM_BUY_ITEM
java.lang.NullPointerException
    at gameserver.services.PrivateStoreService.loadObjIds(PrivateStoreService.java:227)
    at gameserver.services.PrivateStoreService.sellStoreItem(PrivateStoreService.java:140)
    at gameserver.network.aion.clientpackets.CM_BUY_ITEM.runImpl(CM_BUY_ITEM.java:102)
    at gameserver.network.aion.AionClientPacket.run(AionClientPacket.java:64)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at gameserver.taskmanager.FIFORunnableQueue.removeAndExecuteFirst(FIFORunnableQueue.java:28)
    at gameserver.taskmanager.FIFOExecutableQueue.run(FIFOExecutableQueue.java:65)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.run(ExecuteWrapper.java:39)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Please provide any additional information below.

Original issue reported on code.google.com by Acu...@gmail.com on 3 Mar 2011 at 6:31

GoogleCodeExporter commented 9 years ago
For some reason it looks like a ObjectId was sent into the Item Template 
Retrieval, when it should be the ItemId.

See if this fixes your issue:

Index: GameServer/src/gameserver/services/PrivateStoreService.java
===================================================================
--- GameServer/src/gameserver/services/PrivateStoreService.java (revision 144)
+++ GameServer/src/gameserver/services/PrivateStoreService.java (working copy)
@@ -226,7 +226,7 @@
             int i = 0;
             for (int itemObjId : store.getSoldItems().keySet()) {
                 if (i == tradeItem.getItemId())
-                    newTradeList.addPSItem(itemObjId, tradeItem.getCount());
+                    newTradeList.addPSItem(tradeItem.getItemId(), 
tradeItem.getCount());
                 i++;
             }
         }

Original comment by ZeroSign...@gmail.com on 7 Mar 2011 at 5:15

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 7 Mar 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Now it says "item template not found for itemid 0"

Original comment by Acu...@gmail.com on 7 Mar 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Issue 18 has been merged into this issue.

Original comment by ZeroSign...@gmail.com on 7 Mar 2011 at 2:07

GoogleCodeExporter commented 9 years ago
I have had a better look at this issue, there needs to be quite a allot of code 
modification. Will provide a patch in a couple days.

Original comment by ZeroSign...@gmail.com on 7 Mar 2011 at 6:12

GoogleCodeExporter commented 9 years ago
See:
http://aionxemu.com/viewtopic.php?f=6&t=718

Original comment by ZeroSign...@gmail.com on 9 Mar 2011 at 2:23

GoogleCodeExporter commented 9 years ago
Selling Weapons is still bugged see link above.

Original comment by ZeroSign...@gmail.com on 15 Mar 2011 at 5:10

GoogleCodeExporter commented 9 years ago
The Private Store works fine with Patch however all weapons corrupt the Private 
Store Items after it for Buyers. Someone needs to sniff and obtain correct 
Weapon packet section structure for SM_PRIVATE_STORE.

Original comment by ZeroSign...@gmail.com on 17 Mar 2011 at 12:09

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 23 Mar 2011 at 5:08

GoogleCodeExporter commented 9 years ago
Private Stored are Committed Revision 222. However in InventoryPacket the 
Weapon Packet structure still needs fixing or it corrupts the Trading Items 
List.

Original comment by ZeroSign...@gmail.com on 26 Mar 2011 at 12:19

GoogleCodeExporter commented 9 years ago
Issue 193 has been merged into this issue.

Original comment by ZeroSign...@gmail.com on 28 Mar 2011 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 6 Apr 2011 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 6 Apr 2011 at 1:59

GoogleCodeExporter commented 9 years ago
Weapons should now be able to be sold in Private Stores.

Committed Revision 246.

Original comment by ZeroSign...@gmail.com on 6 Apr 2011 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by ZeroSign...@gmail.com on 20 Apr 2011 at 9:26

GoogleCodeExporter commented 9 years ago
This line don't exist in "PrivateStore" service

int i = 0;
             for (int itemObjId : store.getSoldItems().keySet()) {
                 if (i == tradeItem.getItemId())
-                    newTradeList.addPSItem(itemObjId, tradeItem.getCount());
+                 
newTradeList.addPSItem(tradeItem.getItemId(),tradeItem.getCount());
                 i++;
             }
         }

Original comment by apophis1...@gmail.com on 20 Apr 2011 at 9:47

GoogleCodeExporter commented 9 years ago
That Fix above was bugged and replaced by proper working code.

Original comment by ZeroSign...@gmail.com on 20 Apr 2011 at 9:49

GoogleCodeExporter commented 9 years ago
yes,i know but i don't find this line :(

Original comment by apophis1...@gmail.com on 20 Apr 2011 at 10:05

GoogleCodeExporter commented 9 years ago
this line for (int itemObjId : store.getSoldItems().keySet()) {

or this line 

-                    newTradeList.addPSItem(itemObjId, tradeItem.getCount());

Original comment by apophis1...@gmail.com on 20 Apr 2011 at 10:06

GoogleCodeExporter commented 9 years ago
Correct, and you shouldnt be able too, the patch in Comment 1 was completely 
incorrect.

Original comment by ZeroSign...@gmail.com on 20 Apr 2011 at 12:44