xydius
Just an otland wanderer
- Joined
- Feb 25, 2016
- Messages
- 41
- Reaction score
- 37
Hello fellow otlanders heres a little edit i did for my custom ot and i felt like sharing it.
First of all what is a quiver? A quiver is a container where u can put your arrows/bolts and use them while equiped with a bow/crossbow like show in the picture below.
EDIT
Q.- do you "bla bla bla" for tfs 0.4?
A.- No, i dont. Move on already guys.
First of all what is a quiver? A quiver is a container where u can put your arrows/bolts and use them while equiped with a bow/crossbow like show in the picture below.
EDIT
- First go to your source files and look for player.cpp
- Then look for
Code:
Item* Player::getWeapon(slots_t slot, bool ignoreAmmo) const
- In that function look for
Code:if (it.ammoType != AMMO_NONE) { Item* ammoItem = inventory[CONST_SLOT_AMMO];
Code:/*edit for quiver*/ if (!ammoItem) { return nullptr; } if (Container* container = ammoItem->getContainer()) { for (ContainerIterator iter = container->iterator(); iter.hasNext(); iter.advance()) { const ItemType& itr = Item::items[(*iter)->getID()]; if (itr.ammoType == it.ammoType) { item = (*iter); return item; } } } /*end of edit*/
- Thats it LoL.
- To add an item to add as a quiver remember to edit it with an itemEditor so it can work as a container and add the attribute to the item like this
Code:
<attribute key="containerSize" value="20" />
Q.- do you "bla bla bla" for tfs 0.4?
A.- No, i dont. Move on already guys.