MNoya / BuildingHelper

Library for RTS & TD Dota Custom Games
GNU General Public License v3.0
37 stars 14 forks source link

BuildingHelper:UpgradeBuilding #22

Open SirWayN3 opened 5 years ago

SirWayN3 commented 5 years ago

I just found an error and some suggestions regarding this function.

Error: function BuildingHelper:BlockPSO(size, location) -- if size == 0 then return end -- size can be nil, when no KV "PathingSize" has been set if size == 0 or size == nil then return end

Suggestions:

  1. Add Upgrade Duration to the Function
  2. Add Modifier Copy & Paste from the old Building to the new.
  3. Make new Building selected by Default
  4. Remove Building Invulnerable from newly spawned Building
SirWayN3 commented 5 years ago

To 3: directly after local new_building = BuildingHelper:PlaceBuilding( -- Remove invulnerability on npc_dota_building baseclass new_building:RemoveModifierByName("modifier_invulnerable")