// This method makes it possible for a creature to loot an attackitem. // If the item is lootable, then it's power is increased by the item's hitpoint and it's added to the list. // If the Item is removable, then the item will lose the power it was increased with and it will be removed from the list. public void LootAttackItem(AttackItem aI) { if (aI.Lootable) { _power = _power + aI.Hitpoint; _worldObjectList.Add(aI); if (aI.Removable) { _power = _power - aI.Hitpoint; _worldObjectList.Remove(aI); } } }
public override void ApplyPlacement(Player player, GridBlock block, Vector3 worldPos) { spawnedObject.transform.position = block.GridPosition.WorldPosition; spawnedObject.SetupObject(block); spawnedObject.transform.SetParent(PlaceableParent.Reference); WorldObjectList.Add(spawnedObject); spawnedObject = null; }
public override void ApplyPlacement(Player player, GridBlock block, Vector3 worldPos) { if (Reference.Reference != null) { return; } spawnedObject.transform.position = block.GridPosition.WorldPosition; Reference.Reference = spawnedObject; spawnedObject.SetupObject(block); spawnedObject.transform.SetParent(PlaceableParent.Reference); WorldObjectList.Add(spawnedObject); HasReference.Value = true; spawnedObject = null; }
public void Add(WorldID key, WorldObject obj) { switch (key.Type) { case EDatabaseType.Account: mAccount.Add(key, obj); break; case EDatabaseType.Char: mCharacter.Add(key, obj); break; case EDatabaseType.Guild: mGuild.Add(key, obj); break; case EDatabaseType.Homunculus: mHomonculus.Add(key, obj); break; case EDatabaseType.Item: mItem.Add(key, obj); break; case EDatabaseType.Mob: mMonster.Add(key, obj); break; case EDatabaseType.Npc: mNpc.Add(key, obj); break; case EDatabaseType.Party: mParty.Add(key, obj); break; case EDatabaseType.Pet: mPet.Add(key, obj); break; case EDatabaseType.Skill: mSkill.Add(key, obj); break; } }