找回密码
 点一下
查看: 1804|回复: 0

灵异的问题

[复制链接]
发表于 2008-7-29 18:03:47 | 显示全部楼层 |阅读模式

life,mana,Um是全局变量。


function Wind takes nothing returns nothing
    if ( GetUnitTypeId(GetFilterUnit()) == 'XXX1' )  then
    set life = GetUnitState( GetFilterUnit(),UNIT_STATE_LIFE)
    set mana = GetUnitState( GetFilterUnit(),UNIT_STATE_MANA)
    call ReplaceUnitBJ( GetFilterUnit(), 'XXX2, bj_UNIT_STATE_METHOD_RELATIVE )
    set Um = GetLastReplacedUnitBJ()
    call DisplayTextToPlayer( Player(0), 0, 0, "Um life1"+R2S(life) )
    call DisplayTextToPlayer( Player(0), 0, 0, "Um mana1"+R2S(mana) )
    call SetUnitLifeBJ(Um,life)
    call SetUnitManaBJ(Um,mana)
    call DisplayTextToPlayer( Player(0), 0, 0, "Um life2"+R2S(life) )
    call DisplayTextToPlayer( Player(0), 0, 0, "Um mana2"+R2S(mana) )
    endif
endfunction

Um life1,
Um mana1,

Um life2,
Um mana2,


输出值不一样。
2比1正好大1000(计算小数)



最初使用的是
   call SetUnitLifeBJ(Um,GetUnitState( GetFilterUnit(),UNIT_STATE_LIFE) )
也是这个问题
您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-9 10:04 , Processed in 0.120447 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表