Items Implementation (#11)

* Item Manager (Initial Implementation)

* Item Manager (Second Phase)

* Item Manager (Phase Three)

* Not Working Code

* Inventory Implementation (Complete?)

* Items Implementation

-Fixed Indentations
-Final touches to make it all work

* Update Makefile

* Added small comments

-- needs to be fixed
This commit is contained in:
JadeShrineMaiden
2020-08-21 03:10:14 +01:00
committed by GitHub
parent e044b4251a
commit aa2adcd9e2
8 changed files with 91 additions and 1 deletions

View File

@@ -93,13 +93,20 @@ void CNLoginServer::handlePacket(CNSocket* sock, CNPacketData* data) {
loginSessions[sock].characters[UID].PCStyle2 = charInfo->sPC_Style2;
for (int i = 0; i < AEQUIP_COUNT; i++) {
// setup item
// setup equips
charInfo->aEquip[i].iID = 0;
charInfo->aEquip[i].iType = i;
charInfo->aEquip[i].iOpt = 0;
loginSessions[sock].characters[UID].Equip[i] = charInfo->aEquip[i];
}
for (int i = 0; i < AINVEN_COUNT; i++) {
// setup inventories
loginSessions[sock].characters[UID].Inven[i].iID = 0;
loginSessions[sock].characters[UID].Inven[i].iType = 0;
loginSessions[sock].characters[UID].Inven[i].iOpt = 0;
}
// set default to the first character
if (i == 0)
loginSessions[sock].selectedChar = UID;