mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 07:07:45 +00:00
pass actionid through to onEObjHit script callback
This commit is contained in:
parent
dc3e235c0c
commit
5412677e9d
5 changed files with 6 additions and 6 deletions
|
@ -285,7 +285,7 @@ void Sapphire::Action::Action::execute()
|
||||||
}
|
}
|
||||||
else if( auto player = m_pSource->getAsPlayer() )
|
else if( auto player = m_pSource->getAsPlayer() )
|
||||||
{
|
{
|
||||||
pScriptMgr->onEObjHit( *player, m_targetId );
|
pScriptMgr->onEObjHit( *player, m_targetId, getId() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ namespace Sapphire::ScriptAPI
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventScript::onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId )
|
void EventScript::onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ namespace Sapphire::ScriptAPI
|
||||||
virtual void onEventHandlerTradeReturn( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param,
|
virtual void onEventHandlerTradeReturn( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param,
|
||||||
uint32_t catalogId );
|
uint32_t catalogId );
|
||||||
|
|
||||||
virtual void onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId );
|
virtual void onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId );
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -300,7 +300,7 @@ bool Sapphire::Scripting::ScriptMgr::onBNpcKill( Entity::Player& player, uint16_
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::Scripting::ScriptMgr::onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId )
|
bool Sapphire::Scripting::ScriptMgr::onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId )
|
||||||
{
|
{
|
||||||
auto pEventMgr = framework()->get< World::Manager::EventMgr >();
|
auto pEventMgr = framework()->get< World::Manager::EventMgr >();
|
||||||
bool didCallScript = false;
|
bool didCallScript = false;
|
||||||
|
@ -321,7 +321,7 @@ bool Sapphire::Scripting::ScriptMgr::onEObjHit( Sapphire::Entity::Player& player
|
||||||
|
|
||||||
player.sendDebug( "Calling: {0}.onEObjHit actorId#{1}", objName, actorId );
|
player.sendDebug( "Calling: {0}.onEObjHit actorId#{1}", objName, actorId );
|
||||||
|
|
||||||
script->onEObjHit( player, actorId );
|
script->onEObjHit( player, actorId, actionId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace Sapphire::Scripting
|
||||||
|
|
||||||
bool onBNpcKill( Entity::Player& player, uint16_t nameId );
|
bool onBNpcKill( Entity::Player& player, uint16_t nameId );
|
||||||
|
|
||||||
bool onEObjHit( Entity::Player& player, uint64_t actorId );
|
bool onEObjHit( Entity::Player& player, uint64_t actorId, uint32_t actionId );
|
||||||
|
|
||||||
bool onStart( Action::Action& action );
|
bool onStart( Action::Action& action );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue