RoyAwesome / WorldSmith

Open source Dota 2 Mod Editor
MIT License
59 stars 28 forks source link

NullReference Exception in Node Editor #87

Closed SinZ163 closed 9 years ago

SinZ163 commented 9 years ago

Build140, when dragging variable damage (from the treeview) it raises the unhandle exception"

System.NullReferenceException: Object reference not set to an instance of an object.
   at WorldSmith.Panels.DotaAbilityEditor.treeView1_ItemDrag(Object sender, ItemDragEventArgs e)
   at System.Windows.Forms.TreeView.TvnBeginDrag(MouseButtons buttons, NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Spell KV:

"teve_archer_power_shot"
{
    "BaseClass" "ability_datadriven"
    "AbilityBehavior"   "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
    "AbilityTextureName"    "placeholder"
    "AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_ENEMY"
    "AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
    "AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"
    "AbilityType"   "DOTA_ABILITY_TYPE_BASIC"
    "MaxLevel"  "4"
    "RequiredLevel" "1"
    "LevelsBetweenUpgrades" "2"
    "AbilityCastPoint"  "0.20"
    "AbilityCooldown"   "7"
    "AbilityManaCost"   "80"
    "AbilityCastRange"  "600"
    "AbilityDamage" "100 175 250 325"
    "precache"
    {
        "particle"  "particles/econ/items/luna/luna_crescent_moon/luna_glaive_crescent_moon.vpcf"
    }

    "AbilitySpecial"
    {
        "01"
        {
            "var_type"  "FIELD_FLOAT"
            "stun_duration" "1.5"
        }

        "02"
        {
            "var_type"  "FIELD_INTEGER"
            "damage"    "100 175 250 325"
        }

    }

    "OnSpellStart"
    {
        "TrackingProjectile"
        {
            "Target"    "TARGET"
            "EffectName"    "particles/econ/items/luna/luna_crescent_moon/luna_glaive_crescent_moon.vpcf"
            "Dodgeable" "0"
            "ProvidesVision"    "0"
            "VisionRadius"  "0"
            "MoveSpeed" "1234"
            "SourceAttachment"  "DOTA_PROJECTILE_ATTACHMENT_ATTACK_1"
        }

    }

    "OnProjectileHitUnit"
    {
        "Stun"
        {
            "Target"    "TARGET"
            "Duration"  "%stun_duration"
        }

        "Damage"
        {
            "Target"    "TARGET"
            "Type"  "DAMAGE_TYPE_MAGICAL"
            "Damage"    "%damage"
        }

    }

}