public void Interact(LivingCreature creature) { if (!_looted) { _myColor = Brushes.BurlyWood; creature.TakeLoot( _loot.GetItems() ); // <------------- NEWLY ADDED _looted = true; } }
public override void Interact(LivingCreature creature) { if (!Dead) { if (creature.GetInteractionType() == EnumMazeObject.Monster) { MazeMonster killer = (MazeMonster)creature; if (killer.PartySize() + this.PartySize() <= MaxPartySize) { killer.AddMonsters(_monsterParty); killer.TakeLoot(_creatureInventory.GetItems()); this.Die(); } } else { //enter battle arena BattleWindow theBattle = new BattleWindow(_monsterParty); MainWindow.PauseHive(); theBattle.ShowDialog(); if (creature.Dead) { Restart(); } MainWindow.StartHive(); //exit BA creature.TakeLoot(_creatureInventory.GetItems()); this.Die(); } } }