From e5ae58c4a3d854b1f16238af591ea105b7538401 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Thu, 18 Jan 2024 13:08:30 -0600 Subject: [PATCH] Update 'Adventures in Lestoria/Monster.cpp' --- Adventures in Lestoria/Monster.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Adventures in Lestoria/Monster.cpp b/Adventures in Lestoria/Monster.cpp index 0d442aa1..33f4f9c1 100644 --- a/Adventures in Lestoria/Monster.cpp +++ b/Adventures in Lestoria/Monster.cpp @@ -569,21 +569,28 @@ void Monster::SetStrategyDrawFunction(std::functionfunc){ strategyDraw=func; } -void Monster::OnDeath(){ - animation.ChangeState(internal_animState,GetDeathAnimationName()); - if(isBoss){ - game->ReduceBossEncounterMobCount(); - } - +std::mapMonster::SpawnDrops(){ + std::mapdrops; for(MonsterDropData data:MONSTER_DATA.at(name).GetDropData()){ if(util::random(100)<=data.dropChance){ //This isn't necessarily fair odds for each quantity dropped. int dropQuantity=int(data.minQty+std::round(util::random(float(data.maxQty-data.minQty)))); for(int i=0;iReduceBossEncounterMobCount(); + } + + SpawnDrops(); game->GetPlayer()->AddAccumulatedXP(MONSTER_DATA.at(name).GetXP()); }