1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 06:27:45 +00:00

Final fix?

This commit is contained in:
dude22072 2022-02-23 02:54:34 -06:00
parent 2bb30ecb3e
commit f0957f9521

View file

@ -115,9 +115,9 @@ public:
if( !enemy0Spawned && !enemy1Spawned && !enemy2Spawned && quest.getUI8AL() < 3 ) if( !enemy0Spawned && !enemy1Spawned && !enemy2Spawned && quest.getUI8AL() < 3 )
{ {
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() ); auto enemy0 = instance->createBNpcFromLayoutId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
auto enemy1 = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() ); auto enemy1 = instance->createBNpcFromLayoutId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
auto enemy2 = instance->createBNpcFromInstanceId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() ); auto enemy2 = instance->createBNpcFromLayoutId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
enemy0->hateListAddDelayed( player.getAsPlayer(), 1 ); enemy0->hateListAddDelayed( player.getAsPlayer(), 1 );
enemy1->hateListAddDelayed( player.getAsPlayer(), 1 ); enemy1->hateListAddDelayed( player.getAsPlayer(), 1 );
enemy2->hateListAddDelayed( player.getAsPlayer(), 1 ); enemy2->hateListAddDelayed( player.getAsPlayer(), 1 );
@ -125,9 +125,9 @@ public:
} }
} }
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override void onBNpcKill( World::Quest& quest, Entity::BNpc& bnpc, Entity::Player& player ) override
{ {
switch( entityId ) switch( bnpc.getLayoutId() )
{ {
case Enemy0: case Enemy0:
case Enemy1: case Enemy1: