|
|
@ -54,9 +54,10 @@ var SF_Plugins = SF_Plugins || {};
|
|
|
|
* ============================================================================
|
|
|
|
* ============================================================================
|
|
|
|
* 举例
|
|
|
|
* 举例
|
|
|
|
* ============================================================================
|
|
|
|
* ============================================================================
|
|
|
|
* 1. 添加状态 125 时,
|
|
|
|
* 1. 添加状态 125 前,
|
|
|
|
* 如果目标已经拥有状态 124,则删除状态 124,添加状态 125
|
|
|
|
* 如果目标已经拥有状态 124,则删除状态 124,添加状态 125
|
|
|
|
* 否则,添加状态 125
|
|
|
|
* 否则,添加状态 125、
|
|
|
|
|
|
|
|
*
|
|
|
|
* <SF_StatesCustomAddtion_Before>
|
|
|
|
* <SF_StatesCustomAddtion_Before>
|
|
|
|
* var result = {
|
|
|
|
* var result = {
|
|
|
|
* "result": false,
|
|
|
|
* "result": false,
|
|
|
@ -74,6 +75,28 @@ var SF_Plugins = SF_Plugins || {};
|
|
|
|
* return result;
|
|
|
|
* return result;
|
|
|
|
* </SF_StatesCustomAddtion_Before>
|
|
|
|
* </SF_StatesCustomAddtion_Before>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
*============================================================================
|
|
|
|
|
|
|
|
* 举例2
|
|
|
|
|
|
|
|
*============================================================================
|
|
|
|
|
|
|
|
* 2. 添加状态60前,
|
|
|
|
|
|
|
|
* 生成整随机数1~10,如果随机数小于等于5,则添加状态148
|
|
|
|
|
|
|
|
* (随机数结果不影响状态60)的添加
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* <SF_StatesCustomAddtion_Before>
|
|
|
|
|
|
|
|
* var result = {
|
|
|
|
|
|
|
|
* "result": false,
|
|
|
|
|
|
|
|
* "statesAdd": [],
|
|
|
|
|
|
|
|
* "statesRemove": [],
|
|
|
|
|
|
|
|
* "statesRefresh": [],
|
|
|
|
|
|
|
|
* };
|
|
|
|
|
|
|
|
* result.statesAdd.push(60);
|
|
|
|
|
|
|
|
* var random = Math.floor(Math.random() * 10 + 1);
|
|
|
|
|
|
|
|
* if (random <= 5) {
|
|
|
|
|
|
|
|
* result.statesAdd.push(148);
|
|
|
|
|
|
|
|
* }
|
|
|
|
|
|
|
|
* return result;
|
|
|
|
|
|
|
|
* </SF_StatesCustomAddtion_Before>
|
|
|
|
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
* ============================================================================
|
|
|
|
* 已知问题
|
|
|
|
* 已知问题
|
|
|
|