但是感觉Yep_CoreEngine 的逻辑是有用,怕以后有冲突
* Version 1.19:
* - Updated for RPG Maker MV version 1.3.2.
* - Fixed 'LearnSkill' function for actors to not be bypassed if a piece of
* equipment has temporarily added a skill.
参看了一下 https://www.wikimoe.com/?post=48
简单加上了 (function(_global) { })(this);
请教大神这样处理可以么?(以后Yep_CoreEngine 不会报错)如果不对请怎么改?
(function(_global) {
var _STS_Game_Actor_learnSkill = Game_Actor.prototype.learnSkill;
Game_Actor.prototype.learnSkill = function(skillId) {
if (!this.isStsLearnedSkill(skillId)) {
this.setStsSkillCount(skillId, 0);
}
_STS_Game_Actor_learnSkill.call(this, skillId);
this.checkInitSts();
if (this.isLearnedSkill(skillId) && !this.stsCount(skillId)) {
if (FTKR.STS.learnedActorVarID) $gameVariables.setValue(FTKR.STS.learnedActorVarID, this.actorId());
if (FTKR.STS.learnedSkillVarID) $gameVariables.setValue(FTKR.STS.learnedSkillVarID, skillId);
this.stsCountUp(skillId);
this._stsLearnSkills[skillId] = true;
this.checkStsForgetSkills(skillId);
}
if (this._initStsFlag) {
this.stsUsedCost(skillId);
}
};
})(this);