1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 16:57:47 +00:00

Very very simplistic mob exp

This commit is contained in:
Mordred 2022-01-19 17:22:56 +01:00
parent 31010a4cf5
commit 125c02d127
3 changed files with 13 additions and 14 deletions

View file

@ -1808,14 +1808,14 @@ namespace Component::Excel
uint8_t Event; uint8_t Event;
uint8_t ConditionType; uint8_t ConditionType;
uint8_t ConditionOperator; uint8_t ConditionOperator;
uint8_t VisibleCallback : 1;
uint8_t ConditionCallback : 1;
uint8_t BehaviorCallback : 1;
uint8_t ItemCallback : 1;
uint8_t TargetingPossibleCallback : 1;
uint8_t QualifiedCallback : 1;
uint8_t AnnounceCallback : 1;
uint8_t AcceptCallback : 1; uint8_t AcceptCallback : 1;
uint8_t AnnounceCallback : 1;
uint8_t QualifiedCallback : 1;
uint8_t TargetingPossibleCallback : 1;
uint8_t ItemCallback : 1;
uint8_t BehaviorCallback : 1;
uint8_t ConditionCallback : 1;
uint8_t VisibleCallback : 1;
}; };
/* 264322 */ /* 264322 */

View file

@ -107,18 +107,12 @@ public:
} }
case Enemy1: case Enemy1:
{ {
if( currentKC49 >= 3 ) if( currentKC49 <= 3 )
{ {
quest.setUI8BH( currentKC49 ); quest.setUI8BH( currentKC49 );
checkQuestCompletion( quest, player ); checkQuestCompletion( quest, player );
eventMgr().sendEventNotice( player, getId(), 2, 2, currentKC49, 3 ); eventMgr().sendEventNotice( player, getId(), 2, 2, currentKC49, 3 );
} }
else if( currentKC49 < 3 )
{
quest.setUI8BH( currentKC49 );
eventMgr().sendEventNotice( player, getId(), 2, 2, currentKC49, 3 );
}
break; break;
} }
case Enemy2: case Enemy2:

View file

@ -775,6 +775,10 @@ void Sapphire::Entity::BNpc::onDeath()
m_timeOfDeath = Util::getTimeSeconds(); m_timeOfDeath = Util::getTimeSeconds();
setOwner( nullptr ); setOwner( nullptr );
auto& exdData = Common::Service< Data::ExdData >::ref();
auto paramGrowthInfo = exdData.getRow< Component::Excel::ParamGrow >( m_level );
for( auto& pHateEntry : m_hateList ) for( auto& pHateEntry : m_hateList )
{ {
// TODO: handle drops // TODO: handle drops
@ -783,6 +787,7 @@ void Sapphire::Entity::BNpc::onDeath()
{ {
auto& playerMgr = Common::Service< World::Manager::PlayerMgr >::ref(); auto& playerMgr = Common::Service< World::Manager::PlayerMgr >::ref();
playerMgr.onMobKill( *pPlayer, static_cast< uint16_t >( m_bNpcNameId ), getLayoutId() ); playerMgr.onMobKill( *pPlayer, static_cast< uint16_t >( m_bNpcNameId ), getLayoutId() );
pPlayer->gainExp( paramGrowthInfo->data().BaseExp );
} }
} }
hateListClear(); hateListClear();