mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
Merge pull request #750 from hkAlice/threepointoh
[3.0] expose playermgr() to nativescript; fix friendlist insert on new character;
This commit is contained in:
commit
ad1f1fd45d
2 changed files with 32 additions and 0 deletions
|
@ -273,6 +273,11 @@ void PlayerMinimal::saveAsNew()
|
|||
std::vector< uint8_t > friendIds( 1600, 0 );
|
||||
std::vector< uint8_t > inviteIds( 1600, 0 );
|
||||
|
||||
stmtFriendList->setUInt64( 1, m_characterId );
|
||||
stmtFriendList->setBinary( 2, friendIds );
|
||||
stmtFriendList->setBinary( 3, inviteIds );
|
||||
g_charaDb.directExecute( stmtFriendList );
|
||||
|
||||
// Blacklist related
|
||||
auto stmtBlacklist = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_BLACKLIST_INS );
|
||||
std::vector< uint8_t > blIds( 1600, 0 );
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "Event/EventHandler.h"
|
||||
#include "Manager/EventMgr.h"
|
||||
#include "Manager/LinkshellMgr.h"
|
||||
#include "Manager/PlayerMgr.h"
|
||||
#include "Service.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
@ -170,6 +171,7 @@ namespace Sapphire::ScriptAPI
|
|||
|
||||
virtual void onEObjHit( Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId );
|
||||
|
||||
|
||||
World::Manager::EventMgr& eventMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::EventMgr >::ref();
|
||||
|
@ -179,6 +181,11 @@ namespace Sapphire::ScriptAPI
|
|||
{
|
||||
return Common::Service< World::Manager::LinkshellMgr >::ref();
|
||||
}
|
||||
|
||||
World::Manager::PlayerMgr& playerMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
};
|
||||
|
||||
class QuestScript : public ScriptObject
|
||||
|
@ -229,6 +236,11 @@ namespace Sapphire::ScriptAPI
|
|||
{
|
||||
return Common::Service< World::Manager::EventMgr >::ref();
|
||||
}
|
||||
|
||||
World::Manager::PlayerMgr& playerMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -245,6 +257,11 @@ namespace Sapphire::ScriptAPI
|
|||
{
|
||||
return Common::Service< World::Manager::EventMgr >::ref();
|
||||
}
|
||||
|
||||
World::Manager::PlayerMgr& playerMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -286,6 +303,11 @@ namespace Sapphire::ScriptAPI
|
|||
{
|
||||
return Common::Service< World::Manager::EventMgr >::ref();
|
||||
}
|
||||
|
||||
World::Manager::PlayerMgr& playerMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -313,6 +335,11 @@ namespace Sapphire::ScriptAPI
|
|||
{
|
||||
return Common::Service< World::Manager::EventMgr >::ref();
|
||||
}
|
||||
|
||||
World::Manager::PlayerMgr& playerMgr()
|
||||
{
|
||||
return Common::Service< World::Manager::PlayerMgr >::ref();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue