Implemented equipping of items, reading of slot types from item database, and prepared set items and stats structures.
This commit is contained in:
+6
-1
@@ -199,7 +199,12 @@ bool Crawler::OnUserCreate(){
|
||||
ItemDrop::Initialize();
|
||||
|
||||
ValidateGameStatus(); //Checks to make sure everything has been initialized properly.
|
||||
|
||||
Item&it=Inventory::GetItem("Dummy Item 10");
|
||||
|
||||
Inventory::EquipItem(it,EquipSlot::RING1);
|
||||
Inventory::EquipItem(it,EquipSlot::RING2);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2138,7 +2143,7 @@ Item&Crawler::GetLoadoutItem(int slot){
|
||||
void Crawler::SetLoadoutItem(int slot,std::string itemName){
|
||||
if(slot<0||slot>loadout.size()-1)ERR("Invalid inventory slot "+std::to_string(slot)+", please choose a slot in range (0-"+std::to_string(loadout.size()-1)+").");
|
||||
if(Inventory::GetItemCount(itemName)>0){
|
||||
GetLoadoutItem(slot)=Inventory::GetItem(itemName);
|
||||
GetLoadoutItem(slot)=Inventory::CopyItem(itemName);
|
||||
GetLoadoutItem(slot).amt=std::min((uint32_t)"Player.Item Loadout Limit"_I,GetLoadoutItem(slot).Amt()); //We are only allowed to have up to 10 maximum of an item on a journey.
|
||||
InputGroup*inputGroup=nullptr;
|
||||
switch(slot){
|
||||
|
||||
Reference in New Issue
Block a user