mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
moved ally engage stuff to ContentArea onUpdate
This commit is contained in:
parent
520ae7a119
commit
27200b8df5
15 changed files with 115 additions and 98 deletions
|
@ -0,0 +1,22 @@
|
|||
require ("modifiers")
|
||||
|
||||
function onSpawn(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
function onDamageTaken(mob, attacker, damage)
|
||||
if not attacker:IsPlayer() and mob:GetHP() - damage < 0 then
|
||||
mob:addHP(damage)
|
||||
end
|
||||
end
|
||||
|
||||
function onCombatTick(mob, target, tick, contentGroupCharas)
|
||||
if mob:GetSpeed() == 0 then
|
||||
mob:SetMod(modifiersGlobal.Speed, 8)
|
||||
end
|
||||
end
|
||||
|
||||
function onDisengage(mob)
|
||||
mob:SetMod(modifiersGlobal.Speed, 0)
|
||||
mob:Despawn()
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
require ("global")
|
||||
require ("modifiers")
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
|
@ -6,17 +7,5 @@ function onSpawn(ally)
|
|||
ally:SetHP(ally:GetMaxHP())
|
||||
ally.isAutoAttackEnabled = false;
|
||||
ally.neutral = false
|
||||
end
|
||||
|
||||
function onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas);
|
||||
end
|
||||
|
||||
|
||||
function onRoam(ally, contentGroupCharas)
|
||||
ally.detectionType = 0xFF
|
||||
ally.isMovingToSpawn = false
|
||||
ally.neutral = false
|
||||
ally.animationId = 0
|
||||
allyGlobal.onCombatTick(ally, nil, nil, contentGroupCharas)
|
||||
ally:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
|
@ -1,22 +1,10 @@
|
|||
require ("global")
|
||||
|
||||
require ("ally")
|
||||
|
||||
function onSpawn(ally)
|
||||
ally:SetMaxHP(69420)
|
||||
ally:SetHP(ally:GetMaxHP())
|
||||
ally.isAutoAttackEnabled = false
|
||||
ally.isAutoAttackEnabled = false;
|
||||
ally.neutral = false
|
||||
ally:SetMod(modifiersGlobal.Speed, 0)
|
||||
end
|
||||
|
||||
function onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
allyGlobal.onCombatTick(ally, target, tick, contentGroupCharas)
|
||||
end
|
||||
|
||||
function onRoam(ally, contentGroupCharas)
|
||||
ally.detectionType = 0xFF
|
||||
ally.isMovingToSpawn = false
|
||||
ally.neutral = false
|
||||
ally.animationId = 0
|
||||
allyGlobal.onCombatTick(ally, contentGroupCharas)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue