{"action":"created","issue":{"url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/61","repository_url":"https://api.github.com/repos/cmangos/mangos-tbc","labels_url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/61/comments","events_url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/61/events","html_url":"https://github.com/cmangos/mangos-tbc/pull/61","id":159663343,"number":61,"title":"Spell scripting implementation (Make spellEffects.cpp (not)great again)","user":{"login":"killerwife","id":7995382,"avatar_url":"https://avatars.githubusercontent.com/u/7995382?v=3","gravatar_id":"","url":"https://api.github.com/users/killerwife","html_url":"https://github.com/killerwife","followers_url":"https://api.github.com/users/killerwife/followers","following_url":"https://api.github.com/users/killerwife/following{/other_user}","gists_url":"https://api.github.com/users/killerwife/gists{/gist_id}","starred_url":"https://api.github.com/users/killerwife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killerwife/subscriptions","organizations_url":"https://api.github.com/users/killerwife/orgs","repos_url":"https://api.github.com/users/killerwife/repos","events_url":"https://api.github.com/users/killerwife/events{/privacy}","received_events_url":"https://api.github.com/users/killerwife/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2016-06-10T15:40:06Z","updated_at":"2016-06-15T10:12:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cmangos/mangos-tbc/pulls/61","html_url":"https://github.com/cmangos/mangos-tbc/pull/61","diff_url":"https://github.com/cmangos/mangos-tbc/pull/61.diff","patch_url":"https://github.com/cmangos/mangos-tbc/pull/61.patch"},"body":"Implementation of spell scripting outside of those ugly switch cases. Its a system that can be easily extended.\r\n\r\nDisclaimer: It only works for VS 140/VS 120 right now and as an example there is a port of my \r\nhttp://www.wowhead.com/quest=10857/teleport-this script implementation.\r\n\r\nThis could possibly solve a lot of headaches :)\r\n\r\n@cala @Laizerox @cyberium @xfurry and whomever else this may concern.\r\n\r\nPS: To make it link I had to use some sorcery so possibly might not be \"standard\" ^^"},"comment":{"url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/comments/226145496","html_url":"https://github.com/cmangos/mangos-tbc/pull/61#issuecomment-226145496","issue_url":"https://api.github.com/repos/cmangos/mangos-tbc/issues/61","id":226145496,"user":{"login":"killerwife","id":7995382,"avatar_url":"https://avatars.githubusercontent.com/u/7995382?v=3","gravatar_id":"","url":"https://api.github.com/users/killerwife","html_url":"https://github.com/killerwife","followers_url":"https://api.github.com/users/killerwife/followers","following_url":"https://api.github.com/users/killerwife/following{/other_user}","gists_url":"https://api.github.com/users/killerwife/gists{/gist_id}","starred_url":"https://api.github.com/users/killerwife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killerwife/subscriptions","organizations_url":"https://api.github.com/users/killerwife/orgs","repos_url":"https://api.github.com/users/killerwife/repos","events_url":"https://api.github.com/users/killerwife/events{/privacy}","received_events_url":"https://api.github.com/users/killerwife/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T10:12:32Z","updated_at":"2016-06-15T10:12:32Z","body":"Uhm, your concept relies on the SD2 principle of registering spells that I am trying to avoid (I want 0 DB dependency on this system).\r\n\r\nYou do these SpellAuraPeriodic and SpellTargetCheck and EffectAuraChange_spell_giddyup\r\n\r\nInstead what you would do in a proper polymorphic scenario is overload Aura::PeriodickTick, Spell::CheckCast (i will explain this one a bit more) and Aura::WhateverAuraHandlerYouChoose\r\n\r\n\r\nIn regards to the checkcast, all you need to do is something like\r\nSpellCastResult CheckCast(bool strict)\r\n{\r\nSpellCastResult result = Spell::CheckCast(strict);\r\nif(result == SPELL_CAST_OK)\r\nresult = // do custom checks\r\nreturn result;\r\n}\r\nAnd you dont have to do any of that ugly SD2 database registering and whatnot. All you do is register the factory function to the spell factories map (right now its a table, it will be changed) and thats it. Most importantly, almost 0 runtime computation overhead.\r\n\r\n"}}
{"actor":{"display_login":"killerwife"}}