仙魔无双SDK
面向策划逻辑制作的游戏开发包
|
NPC的各种事件回调 更多...
函数 | |
function | OnActive (nObjID, nParam) |
NPC被激活的事件 更多... | |
function | OnInteractive (nObjID, nTargetID) |
与NPC的交互事件 更多... | |
function | OnEnterCombat (nObjID, nParam) |
NPC进入战斗的事件 更多... | |
function | OnLeaveCombat (nObjID, nParam) |
NPC离开战斗的事件 更多... | |
function | OnPassiveEvent_Hit (nObjID, nDamage, nAttackerID, nAttackLogicType, nDistance) |
NPC被攻击 更多... | |
function | OnActiveEvent_Hit (pSrcObj, nDamage, nSpellAttack, nCrit) |
NPC主动造成攻击的事件 更多... | |
function | OnPreDead (nObjID, nAttackerID) |
NPC预死亡事件 更多... | |
function | OnSellItem (nObjID, nParam) |
NPC卖完物品的事件 更多... | |
function | OnCheckFunction (pActor, npcFunc) |
点开NPC,检测NPC某一项功能是否显示的事件 更多... | |
function | OnCheckTripPoint (pActor, tripPointId) |
点开传送,检测传送点是否显示的事件 更多... | |
NPC的各种事件回调
function OnActive | ( | nObjID | , |
nParam | |||
) |
NPC被激活的事件
nObjID | [整数] NPC对象ID |
nParam | [整数] 保留,暂时无用 |
function OnActiveEvent_Hit | ( | pSrcObj | , |
nDamage | , | ||
nSpellAttack | , | ||
nCrit | |||
) |
NPC主动造成攻击的事件
pSrcObj | [角色] NPC的对象,不是ID(是的,是这样) |
nDamage | [整数] 框架传入的造成伤害的数值 |
nSpellAttack | [整数] 是否魔法攻击: 1 魔法攻击 0 非魔法攻击 |
nCrit | [整数] 是否暴击:1 暴击 0 非暴击 |
function OnCheckFunction | ( | pActor | , |
npcFunc | |||
) |
点开NPC,检测NPC某一项功能是否显示的事件
pActor | [角色] NPC的对象,不是ID |
npcFunc | [整数] npc功能ID,和表npcfuncondition.txt中的ID关联 |
function OnCheckTripPoint | ( | pActor | , |
tripPointId | |||
) |
点开传送,检测传送点是否显示的事件
pActor | [角色] NPC的对象,不是ID |
tripPointId | [整数] trip点,和表trippoints.txt关联 |
function OnEnterCombat | ( | nObjID | , |
nParam | |||
) |
NPC进入战斗的事件
nObjID | [整数] NPC对象ID |
nParam | [整数] 使NPC进入战斗的对象 |
function OnInteractive | ( | nObjID | , |
nTargetID | |||
) |
与NPC的交互事件
nObjID | [整数] NPC的对象ID |
nTargetID | [整数] 与此npc交互的对象ID |
1 | 中断后续流程,即不会弹出对话框,或者任意后续流程 |
0 | 不中断后续流程。会弹出对话框。 |
function OnLeaveCombat | ( | nObjID | , |
nParam | |||
) |
NPC离开战斗的事件
nObjID | [整数] NPC对象ID |
nParam | [整数] 保留,暂时无用 |
function OnPassiveEvent_Hit | ( | nObjID | , |
nDamage | , | ||
nAttackerID | , | ||
nAttackLogicType | , | ||
nDistance | |||
) |
NPC被攻击
nObjID | [整数] NPC的对象ID |
nDamage | [整数] 框架传入的造成伤害的数值 |
nAttackerID | [整数] 框架传入的造成伤害的对象ID |
nAttackLogicType | [整数] 攻击类型 0: 物理攻击 1: 法术攻击 2: 物理DOT 3: 法术DOT 4: 物理AOE 5: 法术AOE |
nDistance | [整数] 攻击者距离,暂时不处理 |
function OnPreDead | ( | nObjID | , |
nAttackerID | |||
) |
NPC预死亡事件
nObjID | [整数] NPC的对象ID |
nAttackerID | [整数] 造成这次死亡的攻击者对象ID |
1 | 允许死亡 |
0 | 禁止死亡,此时框架不会让此NPC死亡 |
function OnSellItem | ( | nObjID | , |
nParam | |||
) |
NPC卖完物品的事件
nObjID | [整数] NPC对象ID |
nParam | [整数] 保留,暂时无用 |