mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 09:17:47 +00:00
Update GaiUsb604.cpp
This commit is contained in:
parent
e97bdaa950
commit
b57ea937ee
1 changed files with 5 additions and 4 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "Manager/EventMgr.h"
|
#include "Manager/EventMgr.h"
|
||||||
#include <Actor/Player.h>
|
#include <Actor/Player.h>
|
||||||
|
#include <Actor/BNpc.h>
|
||||||
#include <ScriptObject.h>
|
#include <ScriptObject.h>
|
||||||
#include <Service.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 Enemy0:
|
||||||
case Enemy1:
|
case Enemy1:
|
||||||
|
@ -172,8 +173,8 @@ private:
|
||||||
{
|
{
|
||||||
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 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->createBNpcFromInstanceId( Enemy1, 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 );
|
enemy0->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
enemy1->hateListAdd( player.getAsPlayer(), 1 );
|
enemy1->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
|
Loading…
Add table
Reference in a new issue