use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.
the class DroppedItemManager method pickedUp.
public void pickedUp(Obj item) {
if (!(item instanceof DC_HeroItemObj)) {
return;
}
Coordinates coordinates = item.getCoordinates();
Obj cell = game.getCellByCoordinate(coordinates);
pickUp(cell, (DC_HeroItemObj) item);
}
use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.
the class DroppedItemManager method dropDead.
public void dropDead(Unit unit) {
unit.unequip(ItemEnums.ITEM_SLOT.ARMOR);
unit.unequip(ItemEnums.ITEM_SLOT.MAIN_HAND);
unit.unequip(ItemEnums.ITEM_SLOT.OFF_HAND);
for (DC_HeroItemObj item : unit.getInventory()) {
drop(item, unit);
}
for (DC_HeroItemObj item : unit.getQuickItems()) {
drop(item, unit);
}
for (DC_HeroItemObj item : unit.getJewelry()) {
drop(item, unit);
}
}
use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.
the class ContainerClickHandler method takeAllClicked.
public void takeAllClicked() {
for (DC_HeroItemObj item : new ArrayList<>(container.getItems())) {
if (unit.isInventoryFull()) {
FloatingTextMaster.getInstance().createFloatingText(TEXT_CASES.DEFAULT, "Inventory is full!", unit);
return;
}
container.getItems().remove(item);
unit.addItemToInventory(item);
}
GuiEventManager.trigger(GuiEventType.SHOW_LOOT_PANEL, null);
}
use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.
the class HungItemMaster method generateItem.
private DC_HeroItemObj generateItem(HungItem hungObj) {
Ref ref = new Ref();
DC_HeroItemObj itemObj = ItemFactory.createItemObj(hungObj.getItemType(), DC_Player.NEUTRAL, (MicroGame) ref.getGame(), ref, false);
return itemObj;
}
use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.
the class LootMaster method awardLoot.
private static void awardLoot(ObjType type, Unit h) {
DC_HeroItemObj item = ItemFactory.createItemObj(type, h.getOriginalOwner(), h.getGame(), h.getRef(), false);
h.addItemToInventory(item);
// SAVE: containers into props for type
}
Aggregations