Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc Warden's Tempest Double crash #93

Open
vVv-AA opened this issue Aug 17, 2016 · 3 comments
Open

Arc Warden's Tempest Double crash #93

vVv-AA opened this issue Aug 17, 2016 · 3 comments

Comments

@vVv-AA
Copy link
Contributor

vVv-AA commented Aug 17, 2016

GetIsIllusion in lua modifier causing crashes. Plus, tempest double is not supposed to behave like illusion. It's considered hero for spell interactions.

EDIT:
Also,
Since 6.87 tempest double is not spawned every cast. It is respawned after the first one resulting in the tempest double's cooldowns not being reset on new casts. i.e. old tempest doubles cooldowns need to carry over to the new one. I can't think of a efficient way to do this so i'll leave it here for someone better to fix it.

@Freeman322
Copy link

dormammu_larceny_of_life = class ( {})
LinkLuaModifier( "modifier_lacrency_of_life",
"dormammu_larceny_of_life.lua", LUA_MODIFIER_MOTION_NONE )

function dormammu_larceny_of_life:GetCooldown (nLevel)
if self:GetCaster ():HasScepter () then
return 35
end

return self.BaseClass.GetCooldown (self, nLevel)

end

function dormammu_larceny_of_life:IsStealable ()
return false

end

function dormammu_larceny_of_life:OnSpellStart ()

local caster = self:GetCaster ()
local spawn_location = caster:GetOrigin ()
local duration = self:GetSpecialValueFor ("duration")
local nFXIndex = ParticleManager:CreateParticle

("particles/units/heroes/hero_faceless_void/faceless_void_timedialate.vpcf",
PATTACH_ABSORIGIN_FOLLOW, self:GetCaster () )
ParticleManager:SetParticleControl (nFXIndex, 0, Vector (0, 0, 0))
ParticleManager:SetParticleControl (nFXIndex, 1, Vector (250, 250, 250))
EmitSoundOn ("Hero_FacelessVoid.TimeDilation.Cast", self:GetCaster () )
if self:GetLevel () == 3 and self:GetCaster ():HasScepter () then
local double_scepter = CreateUnitByName (caster:GetUnitName (),
spawn_location + Vector (150, 150, 0), true, caster, caster:GetOwner (),
caster:GetTeamNumber ())
double_scepter:SetControllableByPlayer (caster:GetPlayerID (),
false)

    local caster_level = caster:GetLevel ()
    for i=2, caster_level do
        double_scepter:HeroLevelUp (false)
    end


    for ability_id=0, 15 do
        local ability = double_scepter:GetAbilityByIndex (ability_id)
        if ability then

            ability:SetLevel (caster:GetAbilityByIndex

(ability_id):GetLevel ())
if ability:GetName () == "dormammu_larceny_of_life" then
ability:SetActivated (false)
end
end
end

    for item_id=0, 5 do
        local item_in_caster = caster:GetItemInSlot (item_id)
        if item_in_caster ~= nil then
            local item_name = item_in_caster:GetName ()
            if not (item_name == "item_aegis" or item_name ==

"item_smoke_of_deceit" or item_name == "item_recipe_refresher" or item_name
== "item_refresher" or item_name == "item_ward_observer" or item_name ==
"item_ward_sentry") then
local item_created = CreateItem (item_in_caster:GetName
(), double_scepter, double_scepter)
double_scepter:AddItem (item_created)
item_created:SetCurrentCharges
(item_in_caster:GetCurrentCharges ())
end
end
end

    double_scepter:SetMaximumGoldBounty (0)
    double_scepter:SetMinimumGoldBounty (0)
    double_scepter:SetDeathXP (0)
    double_scepter:SetAbilityPoints (0)

    double_scepter:SetHasInventory (false)
    double_scepter:SetCanSellItems (false)

    double_scepter:AddNewModifier (caster, self,

"modifier_arc_warden_tempest_double", {["duration"] = duration })
double_scepter:AddNewModifier (caster, self, "modifier_kill",
{["duration"] = duration })
double_scepter:AddNewModifier(caster, self,
"modifier_lacrency_of_life", {duration = duration})
end

local double = CreateUnitByName (caster:GetUnitName (), spawn_location,

true, caster, caster:GetOwner (), caster:GetTeamNumber ())
double:SetControllableByPlayer (caster:GetPlayerID (), false)

local caster_level = caster:GetLevel ()
for i=2, caster_level do
    double:HeroLevelUp (false)
end


for ability_id=0, 15 do
    local ability = double:GetAbilityByIndex (ability_id)
    if ability then

        ability:SetLevel (caster:GetAbilityByIndex

(ability_id):GetLevel ())
if ability:GetName () == "dormammu_larceny_of_life" then
ability:SetActivated (false)
end
end
end

for item_id=0, 5 do
    local item_in_caster = caster:GetItemInSlot (item_id)
    if item_in_caster ~= nil then
        local item_name = item_in_caster:GetName ()
        if not (item_name == "item_aegis" or item_name ==

"item_smoke_of_deceit" or item_name == "item_recipe_refresher" or item_name
== "item_refresher" or item_name == "item_ward_observer" or item_name ==
"item_ward_sentry") then
local item_created = CreateItem (item_in_caster:GetName (),
double, double)
double:AddItem (item_created)
item_created:SetCurrentCharges
(item_in_caster:GetCurrentCharges ())
end
end
end

double:SetMaximumGoldBounty (0)
double:SetMinimumGoldBounty (0)
double:SetDeathXP (0)
double:SetAbilityPoints (0)

double:SetHasInventory (false)
double:SetCanSellItems (false)

double:AddNewModifier (caster, self,

"modifier_arc_warden_tempest_double", {["duration"] = duration })
double:AddNewModifier (caster, self, "modifier_kill", {["duration"] =
duration })
double:AddNewModifier(caster, self, "modifier_lacrency_of_life",
{duration = duration})
end
modifier_lacrency_of_life = class({})

function modifier_lacrency_of_life:IsHidden( )
return true
end
function modifier_lacrency_of_life:IsPurgable( )
return false
end
function modifier_lacrency_of_life:OnDestroy( )
if IsServer() then
UTIL_RemoveImmediate( self:GetParent() )
-- Immediately removes the specified entity
end
end

"No crash version"

2016-08-17 8:40 GMT+03:00 vVv-AA [email protected]:

GetIsIllusion in lua modifier causing crashes.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#93, or mute the thread
https://github.com/notifications/unsubscribe-auth/AQo4ItmcOOs57Jo1UB9SLAGLj0DnQCwEks5qgp67gaJpZM4JmHFJ
.

@vVv-AA
Copy link
Contributor Author

vVv-AA commented Aug 17, 2016

Please put that in a pastebin/hastebin link and not as a wall of text.

@Freeman322
Copy link

Its easily to do, when i will got freetime i make it

среда, 17 августа 2016 г. пользователь vVv-AA написал:

Please put that in a pastebin/hastebin link and not as a wall of text.
Secondly, there is another issue. Since 6.87 tempest double is not spawned
every cast. It is respawned after the first one resulting in the tempest
double's cooldowns not being reset on new casts. i.e. old tempest doubles
cooldowns need to carry over to the new one. I can't think of a efficient
way to do this so i'll leave it here for someone better to fix it.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#93 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQo4Ip7l_NzcB99FHKFQiDFph1PHWHCTks5qgvJsgaJpZM4JmHFJ
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants