Start mobequip refactor
This commit is contained in:
@@ -451,8 +451,8 @@ public class EffectsBase {
|
||||
}
|
||||
|
||||
if (awo.getObjectType().equals(GameObjectType.Item)) {
|
||||
if (source.getCharItemManager() != null) {
|
||||
source.getCharItemManager().updateInventory();
|
||||
if (source.charItemManager != null) {
|
||||
source.charItemManager.updateInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SetItemFlagPowerAction extends AbstractPowerAction {
|
||||
item.setIsID(false); //update failed, reset
|
||||
|
||||
//update inventory
|
||||
CharacterItemManager cim = source.getCharItemManager();
|
||||
CharacterItemManager cim = source.charItemManager;
|
||||
if (cim != null)
|
||||
cim.updateInventory();
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class StealPowerAction extends AbstractPowerAction {
|
||||
return;
|
||||
|
||||
//dupe check, validate player has item
|
||||
if (!tar.validForInventory(ownerPC.getClientConnection(), ownerPC, ownerPC.getCharItemManager()))//pc.getCharItemManager()))
|
||||
if (!tar.validForInventory(ownerPC.getClientConnection(), ownerPC, ownerPC.charItemManager))//pc.getCharItemManager()))
|
||||
return;
|
||||
|
||||
//mark thief and target as player aggressive
|
||||
@@ -154,8 +154,8 @@ public class StealPowerAction extends AbstractPowerAction {
|
||||
}
|
||||
|
||||
//attempt transfer item
|
||||
CharacterItemManager myCIM = sourcePlayer.getCharItemManager();
|
||||
CharacterItemManager ownerCIM = ((AbstractCharacter) owner).getCharItemManager();
|
||||
CharacterItemManager myCIM = sourcePlayer.charItemManager;
|
||||
CharacterItemManager ownerCIM = ((AbstractCharacter) owner).charItemManager;
|
||||
if (myCIM == null || ownerCIM == null)
|
||||
return;
|
||||
|
||||
@@ -175,15 +175,15 @@ public class StealPowerAction extends AbstractPowerAction {
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY);
|
||||
|
||||
//update thief's inventory
|
||||
if (sourcePlayer.getCharItemManager() != null)
|
||||
sourcePlayer.getCharItemManager().updateInventory();
|
||||
if (sourcePlayer.charItemManager != null)
|
||||
sourcePlayer.charItemManager.updateInventory();
|
||||
|
||||
//update victims inventory
|
||||
if (owner.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
|
||||
PlayerCharacter ownerPC = (PlayerCharacter) owner;
|
||||
|
||||
if (ownerPC.getCharItemManager() != null)
|
||||
ownerPC.getCharItemManager().updateInventory();
|
||||
if (ownerPC.charItemManager != null)
|
||||
ownerPC.charItemManager.updateInventory();
|
||||
}
|
||||
|
||||
//TODO if victim is trading, cancel trade window for both people involved in trade
|
||||
|
||||
Reference in New Issue
Block a user