1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-03 01:07:47 +00:00

Update GaiUsb604.cpp

This commit is contained in:
dude22072 2022-02-23 02:10:54 -06:00
parent e97bdaa950
commit b57ea937ee

View file

@ -4,6 +4,7 @@
#include "Manager/EventMgr.h"
#include <Actor/Player.h>
#include <Actor/BNpc.h>
#include <ScriptObject.h>
#include <Service.h>
@ -104,9 +105,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 Enemy1:
@ -172,8 +173,8 @@ private:
{
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 1220 /*Find the right value*/, Common::BNpcType::Enemy, player.getId() );
auto enemy1 = instance->createBNpcFromInstanceId( Enemy1, 1220 /*Find the right value*/, Common::BNpcType::Enemy, player.getId() );
auto enemy0 = instance->createBNpcFromLayoutId( Enemy0, 1220 /*Find the right value*/, Common::BNpcType::Enemy, player.getId() );
auto enemy1 = instance->createBNpcFromLayoutId( Enemy1, 1220 /*Find the right value*/, Common::BNpcType::Enemy, player.getId() );
enemy0->hateListAdd( player.getAsPlayer(), 1 );
enemy1->hateListAdd( player.getAsPlayer(), 1 );