{"action":"created","issue":{"url":"https://api.github.com/repos/cmangos/issues/issues/934","repository_url":"https://api.github.com/repos/cmangos/issues","labels_url":"https://api.github.com/repos/cmangos/issues/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/cmangos/issues/issues/934/comments","events_url":"https://api.github.com/repos/cmangos/issues/issues/934/events","html_url":"https://github.com/cmangos/issues/issues/934","id":155996462,"number":934,"title":"[classic] server crash","user":{"login":"yyhhrr","id":3608322,"avatar_url":"https://avatars.githubusercontent.com/u/3608322?v=3","gravatar_id":"","url":"https://api.github.com/users/yyhhrr","html_url":"https://github.com/yyhhrr","followers_url":"https://api.github.com/users/yyhhrr/followers","following_url":"https://api.github.com/users/yyhhrr/following{/other_user}","gists_url":"https://api.github.com/users/yyhhrr/gists{/gist_id}","starred_url":"https://api.github.com/users/yyhhrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyhhrr/subscriptions","organizations_url":"https://api.github.com/users/yyhhrr/orgs","repos_url":"https://api.github.com/users/yyhhrr/repos","events_url":"https://api.github.com/users/yyhhrr/events{/privacy}","received_events_url":"https://api.github.com/users/yyhhrr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-20T16:01:56Z","updated_at":"2016-05-28T10:29:17Z","closed_at":null,"body":"**Current behavior**: \r\nwhen boss use some certain spell that modify threat percent,the server crash\r\n**Expected behavior**: \r\n\r\n**Steps to reproduce**:\r\nif boss have spell like below .When they use this,the server crash.\r\nif (m_uiGougeTimer < uiDiff)\r\n            {\r\n                if (DoCastSpellIfCan(m_creature, SPELL_GOUGE) == CAST_OK)\r\n                {\r\n                    if (m_creature->getThreatManager().getThreat(m_creature->getVictim()))\r\n                        m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -80);\r\n\r\n                    m_uiGougeTimer = urand(17000, 27000);\r\n                }\r\n            }\r\n            else\r\n                m_uiGougeTimer -= uiDiff;\r\n\r\n**Client version**: \r\n\r\n**Commit hash**: \r\nlatest\r\n**Database version**: \r\n\r\n**Operating system**: \r\n\r\n\r\n[//]: # (If this is a crash report, include the crashlog from a debug build with https://gist.github.com/)\r\n"},"comment":{"url":"https://api.github.com/repos/cmangos/issues/issues/comments/222301623","html_url":"https://github.com/cmangos/issues/issues/934#issuecomment-222301623","issue_url":"https://api.github.com/repos/cmangos/issues/issues/934","id":222301623,"user":{"login":"VladimirMangos","id":29081,"avatar_url":"https://avatars.githubusercontent.com/u/29081?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirMangos","html_url":"https://github.com/VladimirMangos","followers_url":"https://api.github.com/users/VladimirMangos/followers","following_url":"https://api.github.com/users/VladimirMangos/following{/other_user}","gists_url":"https://api.github.com/users/VladimirMangos/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirMangos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirMangos/subscriptions","organizations_url":"https://api.github.com/users/VladimirMangos/orgs","repos_url":"https://api.github.com/users/VladimirMangos/repos","events_url":"https://api.github.com/users/VladimirMangos/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirMangos/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T10:29:17Z","updated_at":"2016-05-28T10:29:17Z","body":"Cleary script must check case when boss not have target by some reason, and check  something like:\r\n\r\n`                    if (Unit* victim = m_creature->getVictim())\r\n                        if (m_creature->getThreatManager().getThreat(victim))\r\n                            m_creature->getThreatManager().modifyThreatPercent(victim, -80);\r\n`\r\n\r\nInstead hacks in more generic functions expected proper data provided in args"}}
{"actor":{"display_login":"VladimirMangos"}}