Start mobequip refactor
This commit is contained in:
@@ -94,12 +94,12 @@ public class CharacterItemManager {
|
||||
if (template == null)
|
||||
return;
|
||||
|
||||
CharacterItemManager itemMan = pc.getCharItemManager();
|
||||
CharacterItemManager itemMan = pc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return;
|
||||
|
||||
CharacterItemManager npcCim = npc.getCharItemManager();
|
||||
CharacterItemManager npcCim = npc.charItemManager;
|
||||
|
||||
if (npcCim == null)
|
||||
return;
|
||||
@@ -322,7 +322,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.getOwner().getCharItemManager().getGoldTrading() > 0) {
|
||||
if (this.getOwner().charItemManager.getGoldTrading() > 0) {
|
||||
if (this.getOwner().getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.getOwner(), 195);
|
||||
return false;
|
||||
@@ -440,8 +440,8 @@ public class CharacterItemManager {
|
||||
|
||||
// TODO uncomment this block after we determine when we
|
||||
// setBankOpen(false) and setVaultOpen(false)
|
||||
CharacterItemManager cim1 = source.getCharItemManager();
|
||||
CharacterItemManager cim2 = target.getCharItemManager();
|
||||
CharacterItemManager cim1 = source.charItemManager;
|
||||
CharacterItemManager cim2 = target.charItemManager;
|
||||
|
||||
if (cim1 == null)
|
||||
return false;
|
||||
@@ -539,7 +539,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
|
||||
|
||||
CharacterItemManager toTradeWith = target.getCharItemManager();
|
||||
CharacterItemManager toTradeWith = target.charItemManager;
|
||||
|
||||
if (toTradeWith == null)
|
||||
return false;
|
||||
@@ -603,7 +603,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -669,7 +669,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -725,7 +725,7 @@ public class CharacterItemManager {
|
||||
if (source == null || !source.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager sourceItemMan = source.getCharItemManager();
|
||||
CharacterItemManager sourceItemMan = source.charItemManager;
|
||||
|
||||
if (sourceItemMan == null)
|
||||
return false;
|
||||
@@ -768,7 +768,7 @@ public class CharacterItemManager {
|
||||
if (other == null || !other.isAlive())
|
||||
return false;
|
||||
|
||||
CharacterItemManager tradingWith = other.getCharItemManager();
|
||||
CharacterItemManager tradingWith = other.charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
@@ -784,7 +784,7 @@ public class CharacterItemManager {
|
||||
CloseTradeWindowMsg ctwm2 = new CloseTradeWindowMsg(other, tradeID);
|
||||
this.commitTrade();
|
||||
this.closeTradeWindow(ctwm1, false);
|
||||
other.getCharItemManager().closeTradeWindow(ctwm2, false);
|
||||
other.charItemManager.closeTradeWindow(ctwm2, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -797,7 +797,7 @@ public class CharacterItemManager {
|
||||
|
||||
if (this.getTradingWith().getPlayerCharacter() == null)
|
||||
return false;
|
||||
CharacterItemManager man2 = this.getTradingWith().getPlayerCharacter().getCharItemManager();
|
||||
CharacterItemManager man2 = this.getTradingWith().getPlayerCharacter().charItemManager;
|
||||
Dispatch dispatch;
|
||||
|
||||
if (man1 == null || man2 == null)
|
||||
@@ -825,7 +825,7 @@ public class CharacterItemManager {
|
||||
if (source == null)
|
||||
return false;
|
||||
|
||||
CharacterItemManager sourceItemMan = source.getCharItemManager();
|
||||
CharacterItemManager sourceItemMan = source.charItemManager;
|
||||
|
||||
if (sourceItemMan == null)
|
||||
return false;
|
||||
@@ -851,7 +851,7 @@ public class CharacterItemManager {
|
||||
sourceItemMan.endTrade();
|
||||
|
||||
|
||||
cc2.getPlayerCharacter().getCharItemManager().closeTradeWindow(msg, false);
|
||||
cc2.getPlayerCharacter().charItemManager.closeTradeWindow(msg, false);
|
||||
|
||||
|
||||
return true;
|
||||
@@ -1149,7 +1149,7 @@ public class CharacterItemManager {
|
||||
if (tar == null)
|
||||
return false;
|
||||
|
||||
CharacterItemManager tarCim = tar.getCharItemManager();
|
||||
CharacterItemManager tarCim = tar.charItemManager;
|
||||
if (tarCim == null)
|
||||
return false;
|
||||
|
||||
@@ -1398,7 +1398,7 @@ public class CharacterItemManager {
|
||||
return false;
|
||||
|
||||
|
||||
if (this.getOwner().getCharItemManager().getGoldTrading() > 0) {
|
||||
if (this.getOwner().charItemManager.getGoldTrading() > 0) {
|
||||
if (this.getOwner().getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
ErrorPopupMsg.sendErrorPopup((PlayerCharacter) this.getOwner(), 195);
|
||||
return false;
|
||||
@@ -1437,7 +1437,7 @@ public class CharacterItemManager {
|
||||
if (itemToSell == null || npc == null)
|
||||
return false;
|
||||
|
||||
itemMan = npc.getCharItemManager();
|
||||
itemMan = npc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -1495,7 +1495,7 @@ public class CharacterItemManager {
|
||||
if (purchasedItem == null || npc == null)
|
||||
return false;
|
||||
|
||||
itemMan = npc.getCharItemManager();
|
||||
itemMan = npc.charItemManager;
|
||||
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
@@ -1587,7 +1587,7 @@ public class CharacterItemManager {
|
||||
return null;
|
||||
|
||||
// get looters item manager
|
||||
CharacterItemManager looterItems = lootingPlayer.getCharItemManager();
|
||||
CharacterItemManager looterItems = lootingPlayer.charItemManager;
|
||||
|
||||
if (looterItems == null)
|
||||
return null;
|
||||
@@ -2129,7 +2129,7 @@ public class CharacterItemManager {
|
||||
tradeCharacter = this.tradingWith.getPlayerCharacter();
|
||||
|
||||
tradeWeight = this.getCarriedWeight() + itemWeight;
|
||||
tradeWeight = tradeWeight + tradeCharacter.getCharItemManager().getTradingWeight();
|
||||
tradeWeight = tradeWeight + tradeCharacter.charItemManager.getTradingWeight();
|
||||
tradeWeight = tradeWeight - this.getTradingWeight();
|
||||
|
||||
return tradeWeight <= (int) playerCharacter.statStrBase * 3;
|
||||
@@ -2311,7 +2311,7 @@ public class CharacterItemManager {
|
||||
}
|
||||
|
||||
|
||||
CharacterItemManager tradingWith = this.getTradingWith().getPlayerCharacter().getCharItemManager();
|
||||
CharacterItemManager tradingWith = this.getTradingWith().getPlayerCharacter().charItemManager;
|
||||
|
||||
if (tradingWith == null)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user