靠近特定对象才可使用法术

实现目标
  • 只有靠近特定 creature | gameobject 才能使用特定技能,否则技能无法使用
实现方法

conditions

  • SourceTypeOrReferenceId:17(CONDITION_SOURCE_TYPE_SPELL)
  • SourceGroup:0
  • SourceEntry:技能ID,取值参考 Spell.dbc | Spell.db2
  • ConditionTypeOrReference:
    • 29:CONDITION_NEAR_CREATURE
    • 30:CONDITION_NEAR_GAMEOBJECT
  • ConditionValue1:
    • ConditionType = 29 时,为 creature_template.entry
    • ConditionType = 30 时,为 gameobject_template.entry
  • ConditionValue2:靠近的距离,单位为码
举例
INSERT INTO `world`.`conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES 
(17, 0, 72070, 0, 0, 30, 0, 202113, 5, 0, '', 0, 37, 45, '', 'Spitescale Flag Bunny - Must be Close to the Object to use Spell 72070');

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值