forked from MagicBane/Server
Start mobequip refactor
This commit is contained in:
@@ -232,7 +232,7 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
if (item.getOwner() != null && item.getOwner().getObjectType() == GameObjectType.PlayerCharacter) {
|
||||
PlayerCharacter player = (PlayerCharacter) item.getOwner();
|
||||
int tradingAmount = player.getCharItemManager().getGoldTrading();
|
||||
int tradingAmount = player.charItemManager.getGoldTrading();
|
||||
writer.putInt(item.numberOfItems - tradingAmount);
|
||||
} else
|
||||
writer.putInt(item.numberOfItems); // Amount of gold
|
||||
@@ -334,7 +334,7 @@ public class Item extends AbstractWorldObject {
|
||||
writer.putInt(0); // Pad
|
||||
|
||||
|
||||
writer.putInt(player.getCharItemManager().getGoldTrading()); // Amount of gold
|
||||
writer.putInt(player.charItemManager.getGoldTrading()); // Amount of gold
|
||||
|
||||
|
||||
writer.putInt(0);
|
||||
@@ -347,7 +347,7 @@ public class Item extends AbstractWorldObject {
|
||||
writer.putInt(4); //Non-Magical, grey name
|
||||
writer.putInt(1);
|
||||
writer.putInt(0); // Pad
|
||||
writer.putInt(player.getCharItemManager().getGoldTrading());
|
||||
writer.putInt(player.charItemManager.getGoldTrading());
|
||||
writer.put((byte) 0);
|
||||
|
||||
writer.putShort((short) 0);
|
||||
@@ -375,8 +375,8 @@ public class Item extends AbstractWorldObject {
|
||||
if (!itemWorked)
|
||||
return false;
|
||||
|
||||
reciever.getCharItemManager().addItemToInventory(item);
|
||||
reciever.getCharItemManager().updateInventory();
|
||||
reciever.charItemManager.addItemToInventory(item);
|
||||
reciever.charItemManager.updateInventory();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ public class Item extends AbstractWorldObject {
|
||||
}
|
||||
++serialized;
|
||||
}
|
||||
if (player.getCharItemManager().getGoldTrading() > 0) {
|
||||
if (player.charItemManager.getGoldTrading() > 0) {
|
||||
Item.SerializeTradingGold(player, writer);
|
||||
++serialized;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user