Cleaned up item drop logic.

* Replaced bad exception logic with C-style error returns in ItemManager
* Removed unnecessary instances of objects being passed by value
* Fixed whitespace problems
* Added new config options to the default config.ini
* Updated tabledata reference
This commit is contained in:
2020-10-18 01:19:05 +02:00
parent 7f716c7278
commit 3ce8cf2129
8 changed files with 167 additions and 145 deletions

View File

@@ -43,7 +43,7 @@ struct Mob : public BaseNPC {
time_t nextAttack = 0;
int roamX, roamY, roamZ;
//drop
// drop
int dropType;
// temporary; until we're sure what's what
@@ -129,7 +129,7 @@ namespace MobManager {
int hitMob(CNSocket *sock, Mob *mob, int damage);
void killMob(CNSocket *sock, Mob *mob);
void giveReward(CNSocket *sock, Mob *mob);
sItemBase getReward(MobDrop *drop, MobDropChance *chance);
void getReward(sItemBase *reward, MobDrop *drop, MobDropChance *chance);
void giveEventReward(CNSocket* sock, Player* player);
std::pair<int,int> lerp(int, int, int, int, int);