- Fixed cures not working correctly, it was checking the class while matching level requirements, it was checking the victim class, but we can't rely on the caster class being valid since /castspell among other customization options
- MSpellInfo Mutex updated to shared_mutex since there was a deadlock noticed before calling MSpellInfo.lock
- spawn_npc_spells is now globally loaded (World level) instead of per Zone.
- spawn_npc_spells now has a on_spawn_cast and on_aggro_cast column, these are as described. on_spawn_cast will be subset of buffing, but first casted. Same with on aggro, once on aggro is casted it will no longer cast unless using SetCastOnAggroComplete to reset.
- DB Changes:
alter table spawn_npc_spells add on_spawn_cast tinyint(3) unsigned default 0;
alter table spawn_npc_spells add on_aggro_cast tinyint(3) unsigned default 0;
- NPC AI code updated to support spawn group targets for buffs
- Fixed NPC's being unable to cast friendly spells on each other (heals should work and other spells now)
- Added /reload spells npc command to reload specifically npc spell lists, /reload spells also will include them
- Added LUA Function IsCastOnAggroComplete(NPC) / SetCastOnAggroComplete(NPC, true|false) - this will allow overriding the cast on aggro, if you want the NPC to repeatedly trigger sublists you can keep setting to false
- You can now add a new region identified by its grid and widget id (use /grid to identify when standing over it)
- New LUA Functions:
CreateWidgetRegion(Zone, Version, RegionName, EnvName, GridID, WidgetID, Dist)
* Dist is optional when set to 0.0f we rely only on the widget id, when dist is set we do a radius around the widgets locations
* RegionName and EnvName define the script file so if you are in QueensColony (tutorial_island02) and the RegionName is TestRegion, script is RegionScripts/tutorial_island02/TestRegion.lua
RemoveRegion(Zone, Version, RegionName)
By default Version is 0 on both, but you could specify a version like 546 if you had a DoF client mapped
Example campfire in the newbie area:
ZoneScripts/QueensColony.lua
function init_zone_script, add line:
CreateWidgetRegion(Zone, 0, "TestRegion", "", 924281492, 4117633379, 2.0)
Create new script, RegionScripts/tutorial_island02/TestRegion.lua with the following:
function TakeFireDamage(Spawn)
local invul = IsInvulnerable(Spawn)
if invul == true then
return 0
end
local hp = GetHP(Spawn)
local level = GetLevel(Spawn)
local damageToTake = level * 1
-- if we don't have enough HP make them die to pain and suffering not self
if hp <= damageToTake then
KillSpawn(Spawn, null, 1)
else
DamageSpawn(Spawn, Spawn, 192, 3, damageToTake, damageToTake, "Fire!", 0, 0, 1, 1)
end
end
function EnterRegion(Zone, Spawn, RegionType)
-- initial tick for hitting the fire
TakeFireDamage(Spawn)
-- 5 second Tick
return 5000
end
function Tick(Zone, Spawn, RegionType)
TakeFireDamage(Spawn)
-- returning 1 would stop the Tick process until Spawn leaves/re-enters region
return 0
end
TS bench and recipe List Fixes
Required world list XML update as well Should be included
this will fix 1 items of Issue #467 Tradeskill stations should restrict recipes( these basics take care of standard devices found in starting cities will need some work for house and summoned devices)
PS. i really hope i dont screw this up