删除getEntityAllEffects接口
This commit is contained in:
@@ -360,8 +360,6 @@ const GMLIB_API = {
|
||||
getEntityEffectAmbient: ll.import("GMLIB_API", "getEntityEffectAmbient"),
|
||||
/** 实体是否拥有buff效果 @type {function(Player,number):boolean} */
|
||||
entityHasEffect: ll.import("GMLIB_API", "entityHasEffect"),
|
||||
/** 获取实体所有buff效果 @type {function(Entity):Array.<number>} */
|
||||
getEntityAllEffects: ll.import("GMLIB_API", "getEntityAllEffects"),
|
||||
/** 获取游戏难度 @type {function():number} */
|
||||
getGameDifficulty: ll.import("GMLIB_API", "getGameDifficulty"),
|
||||
/** 设置游戏难度 @type {function(difficulty):void} */
|
||||
|
||||
@@ -936,14 +936,6 @@ void Export_Compatibility_API() {
|
||||
RemoteCall::exportAs("GMLIB_API", "entityHasEffect", [](Actor* entity, int effectId) -> int {
|
||||
return entity->hasEffect(*MobEffect::getById(effectId));
|
||||
});
|
||||
RemoteCall::exportAs("GMLIB_API", "getEntityAllEffects", [](Actor* entity) -> std::vector<int> {
|
||||
auto effects = entity->getAllEffects();
|
||||
std::vector<int> results = {};
|
||||
for (auto effect : effects) {
|
||||
results.push_back((int)effect.mId);
|
||||
}
|
||||
return results;
|
||||
});
|
||||
RemoteCall::exportAs("GMLIB_API", "getGameDifficulty", []() -> int {
|
||||
if (auto level = ll::service::getLevel()) {
|
||||
return (int)level->getDifficulty();
|
||||
|
||||
Reference in New Issue
Block a user