Ruins of Hell Posted March 21, 2012 Author Share Posted March 21, 2012 [(Fix created because of this bug report.)](http://www.touchofdeathforums.com/smf/index.php/topic,78855.0.html)It seems that the code for HoTs just assumes that you want to heal HP. Therefore, even setting a Heal MP spell will heal MP for the first tick, but from then on heal HP regardless of spell type. DoTs are not affected by this error. Here's a fix (it's not elegant, but I tried to touch existing code as little as possible):* * *Everything is server-side.**Fixing it for players**Find:```SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32Player(index).Vital(Vitals.HP) = Player(index).Vital(Vitals.HP) + Spell(.Spell).Vital```and replace it with:```If Spell(.Spell).Type = SPELL_TYPE_HEALHP Then SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32 SetPlayerVital index, Vitals.HP, GetPlayerVital(index, Vitals.HP) + Spell(.Spell).VitalElse SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightBlue, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32 SetPlayerVital index, Vitals.MP, GetPlayerVital(index, Vitals.MP) + Spell(.Spell).VitalEnd If```**Fix for NPCs**Find:```SendActionMsg mapNum, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, MapNpc(mapNum).Npc(index).x * 32, MapNpc(mapNum).Npc(index).y * 32MapNpc(mapNum).Npc(index).Vital(Vitals.HP) = MapNpc(mapNum).Npc(index).Vital(Vitals.HP) + Spell(.Spell).Vital```and replace it with:```If Spell(.Spell).Type = SPELL_TYPE_HEALHP Then SendActionMsg mapNum, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, MapNpc(mapNum).Npc(index).x * 32, MapNpc(mapNum).Npc(index).y * 32 MapNpc(mapNum).Npc(index).Vital(Vitals.HP) = MapNpc(mapNum).Npc(index).Vital(Vitals.HP) + Spell(.Spell).VitalElse SendActionMsg mapNum, "+" & Spell(.Spell).Vital, BrightBlue, ACTIONMSG_SCROLL, MapNpc(mapNum).Npc(index).x * 32, MapNpc(mapNum).Npc(index).y * 32 MapNpc(mapNum).Npc(index).Vital(Vitals.MP) = MapNpc(mapNum).Npc(index).Vital(Vitals.MP) + Spell(.Spell).VitalEnd If``` Link to comment Share on other sites More sharing options...
erkro1 Posted March 22, 2012 Share Posted March 22, 2012 Thanks for the fix, I haven't tried it yet but seeing that it comes from Soul it should work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now