五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

jass基礎(chǔ)-公式合成道具

2023-07-27 01:22 作者:龐各莊大棚  | 我要投稿

// ?道具合成

library demo initializer test

? ? globals

? ? ? ? HechengTemplate array hcArr

? ? ? ? integer index

? ? endglobals


? ? function getPackageItemCount takes unit u, integer itemTypeId returns integer

? ? ? ? local integer i = 0

? ? ? ? local integer count = 0

? ? ? ? local item tempItem

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? set tempItem = UnitItemInSlot(u, i)

? ? ? ? ? ? if tempItem != null and GetItemTypeId(tempItem) == itemTypeId then

? ? ? ? ? ? ? ? set count = count + 1

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set tempItem = null

? ? ? ? return count

? ? endfunction


? ? struct HechengTemplate

? ? ? ? integer itemTypeId0

? ? ? ? integer itemTypeCount0

? ? ? ? integer itemTypeId1

? ? ? ? integer itemTypeCount1

? ? ? ? integer itemTypeId2

? ? ? ? integer itemTypeCount2

? ? ? ? integer itemTypeId3

? ? ? ? integer itemTypeCount3

? ? ? ? integer itemTypeId4

? ? ? ? integer itemTypeCount4

? ? ? ? integer itemTypeId5

? ? ? ? integer itemTypeCount5

? ? ? ?

? ? ? ? integer targetItemId


? ? ? ? effect ef


? ? ? ? public static method create takes integer id0, integer count0, integer id1, integer count1, integer id2, integer count2, integer id3, integer count3, integer id4, integer count4, integer id5, integer count5, integer targetId returns HechengTemplate

? ? ? ? ? ? local HechengTemplate this = HechengTemplate.allocate()

? ? ? ? ? ? set itemTypeId0 = id0

? ? ? ? ? ? set itemTypeCount0 = count0

? ? ? ? ? ? set itemTypeId1 = id1

? ? ? ? ? ? set itemTypeCount1 = count1

? ? ? ? ? ? set itemTypeId2 = id2

? ? ? ? ? ? set itemTypeCount2 = count2

? ? ? ? ? ? set itemTypeId3 = id3

? ? ? ? ? ? set itemTypeCount3 = count3

? ? ? ? ? ? set itemTypeId4 = id4

? ? ? ? ? ? set itemTypeCount4 = count4

? ? ? ? ? ? set itemTypeId5 = id5

? ? ? ? ? ? set itemTypeCount5 = count5

? ? ? ? ? ? set targetItemId = targetId

? ? ? ? ? ? return this

? ? ? ? endmethod


? ? ? ? public method isEnough takes unit u returns boolean

? ? ? ? ? ? if getPackageItemCount(u, this.itemTypeId0) >= this.itemTypeCount0 and getPackageItemCount(u, this.itemTypeId1) >= this.itemTypeCount1 and getPackageItemCount(u, this.itemTypeId2) >= this.itemTypeCount2 and getPackageItemCount(u, this.itemTypeId3) >= this.itemTypeCount3 and getPackageItemCount(u, this.itemTypeId4) >= this.itemTypeCount4 and getPackageItemCount(u, this.itemTypeId5) >= this.itemTypeCount5 then

? ? ? ? ? ? ? ? return true

? ? ? ? ? ? endif

? ? ? ? ? ? return false

? ? ? ? endmethod

? ? endstruct


? ? function doSomething takes nothing returns nothing


? ? endfunction


? ?


? ? function getItemIndex takes unit u, integer itemTypeId returns integer

? ? ? ? local integer i = 0


? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? if GetItemTypeId(UnitItemInSlot(u, i)) == itemTypeId then

? ? ? ? ? ? ? ? return i

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop


? ? ? ? return - 1

? ? endfunction


? ? function hecheng takes unit u, HechengTemplate ht returns nothing

? ? ? ? local integer count = ht.itemTypeCount0

? ? ? ? local integer index

? ? ? ? loop

? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId0)

? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? endif

? ? ? ? ? ? set count = count - 1

? ? ? ? endloop

? ? ? ? set count = ht.itemTypeCount1

? ? ? ? if count > 0 then

? ? ? ? ? ? loop

? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId1)

? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? endloop

? ? ? ? endif

? ? ? ? set count = ht.itemTypeCount2

? ? ? ? if count > 0 then

? ? ? ? ? ? loop

? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId2)

? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? endloop

? ? ? ? endif

? ? ? ? set count = ht.itemTypeCount3

? ? ? ? if count > 0 then

? ? ? ? ? ? loop

? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId3)

? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? endloop

? ? ? ? endif

? ? ? ? set count = ht.itemTypeCount4

? ? ? ? if count > 0 then

? ? ? ? ? ? loop

? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId4)

? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? endloop

? ? ? ? endif

? ? ? ? set count = ht.itemTypeCount5

? ? ? ? if count > 0 then

? ? ? ? ? ? loop

? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeId5)

? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? endloop

? ? ? ? endif

? ? ? ? call UnitAddItemById(u, ht.targetItemId)

? ? ? ? set ht.ef = AddSpecialEffectTargetUnitBJ("overhead", u, "Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl")

? ? endfunction


? ? function aaaa takes nothing returns nothing

? ? ? ? if hcArr[index].ef != null then

? ? ? ? ? ? call DestroyEffect(hcArr[index].ef)

? ? ? ? endif

? ? ? ? call DestroyTimer(GetExpiredTimer())

? ? endfunction


? ? function pickupNew takes nothing returns nothing

? ? ? ? local unit u = GetTriggerUnit()

? ? ? ? local timer tm = CreateTimer()

? ? ? ? local integer i = 0

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 2

? ? ? ? ? ? if hcArr[i].isEnough(u) then

? ? ? ? ? ? ? ? call hecheng(u, hcArr[i])

? ? ? ? ? ? ? ? set index = i

? ? ? ? ? ? ? ? call TimerStart(tm, 2, false, function aaaa)

? ? ? ? ? ? ? ? return

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set u = null

? ? ? ? set tm = null

? ? endfunction


? ? function triggerInit takes nothing returns nothing

? ? ? ? local trigger t = CreateTrigger()

? ? ? ? local trigger t2 = CreateTrigger()

? ? ? ? call TriggerRegisterPlayerChatEvent(t, Player(0), "1", true)

? ? ? ? call TriggerAddAction(t, function doSomething)


? ? ? ? call TriggerRegisterAnyUnitEventBJ(t2, EVENT_PLAYER_UNIT_PICKUP_ITEM)

? ? ? ? call TriggerAddAction(t2, function pickupNew)

? ? ? ?

? ? ? ? call CreateUnit(Player(0), 'H000', - 100, - 100, 0)


? ? ? ? set t = null

? ? ? ? set t2 = null


? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )


? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )


? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )


? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? endfunction


? ? function gameInit takes nothing returns nothing

? ? ? ? call FogEnable(false)

? ? ? ? call FogMaskEnable(false)

? ? endfunction


? ? function test takes nothing returns nothing

? ? ? ? call gameInit()

? ? ? ? call triggerInit()


? ? ? ? set hcArr[0] = HechengTemplate.create('rin1', 1, 'rag1', 1, 'rst1', 1, 0, 0, 0, 0, 0, 0, 'cnob')

? ? ? ? set hcArr[1] = HechengTemplate.create('rin1', 1, 'rag1', 1, 'cnob', 1, 0, 0, 0, 0, 0, 0, 'clsd')

? ? endfunction

endlibrary



jass基礎(chǔ)-公式合成道具的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
邯郸县| 长岭县| 砚山县| 定西市| 醴陵市| 兴仁县| 六盘水市| 同仁县| 新营市| 方正县| 三亚市| 都江堰市| 纳雍县| 庆安县| 资阳市| 周口市| 闵行区| 旅游| 象州县| 屏东市| 当雄县| 廊坊市| 游戏| 上思县| 松江区| 安仁县| 淮南市| 台东市| 瓦房店市| 佛坪县| 滨州市| 丰宁| 沽源县| 济源市| 塔城市| 鄱阳县| 威远县| 清徐县| 淮滨县| 昌宁县| 綦江县|