{"action":"created","comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/113684820","pull_request_review_id":35093804,"id":113684820,"diff_hunk":"@@ -92,6 +92,79 @@ WorldPacket const* WorldPackets::Spells::SendUnlearnSpells::Write()\n     return &_worldPacket;\n }\n \n+template<class T, class U>\n+bool WorldPackets::Spells::SandboxScalingData::GenerateDataForUnits(T*, U*)\n+{\n+    return false;\n+}\n+\n+template<>\n+bool WorldPackets::Spells::SandboxScalingData::GenerateDataForUnits<Creature, Player>(Creature* attacker, Player* target)\n+{\n+    CreatureTemplate const* creatureTemplate = attacker->GetCreatureTemplate();\n+\n+    Type                    = TYPE_CREATURE_TO_PLAYER_DAMAGE;\n+    PlayerItemLevel         = target->GetAverageItemLevel();\n+    TargetLevel             = target->getLevel();\n+    Expansion               = creatureTemplate->RequiredExpansion;\n+    Class                   = creatureTemplate->unit_class;\n+    TargetMinScalingLevel   = creatureTemplate->minlevel;\n+    TargetMaxScalingLevel   = creatureTemplate->maxlevel;\n+    TargetScalingLevelDelta = (int8)creatureTemplate->levelScalingDelta.get();\n+    return true;\n+}\n+\n+template<>\n+bool WorldPackets::Spells::SandboxScalingData::GenerateDataForUnits<Player, Creature>(Player* attacker, Creature* target)\n+{\n+    CreatureTemplate const* creatureTemplate = target->GetCreatureTemplate();\n+\n+    Type                    = TYPE_PLAYER_TO_CREATURE_DAMAGE;\n+    PlayerItemLevel         = attacker->GetAverageItemLevel();\n+    TargetLevel             = target->getLevel();\n+    Expansion               = creatureTemplate->RequiredExpansion;\n+    Class                   = creatureTemplate->unit_class;\n+    TargetMinScalingLevel   = creatureTemplate->minlevel;\n+    TargetMaxScalingLevel   = creatureTemplate->maxlevel;\n+    return true;\n+}\n+\n+template<>\n+bool WorldPackets::Spells::SandboxScalingData::GenerateDataForUnits<Creature, Creature>(Creature* attacker, Creature* target)\n+{\n+    CreatureTemplate const* creatureTemplate = target->GetCreatureTemplate();\n+\n+    if (!creatureTemplate->levelScalingDelta.is_initialized())\n+        creatureTemplate = attacker->GetCreatureTemplate();\n+\n+    Type                    = TYPE_CREATURE_TO_CREATURE_DAMAGE;\n+    TargetLevel             = target->getLevel();\n+    Expansion               = creatureTemplate->RequiredExpansion;\n+    Class                   = creatureTemplate->unit_class;\n+    TargetMinScalingLevel   = creatureTemplate->minlevel;\n+    TargetMaxScalingLevel   = creatureTemplate->maxlevel;\n+    TargetScalingLevelDelta = (int8)creatureTemplate->levelScalingDelta.get();\n+    return true;\n+}\n+\n+template<>\n+bool WorldPackets::Spells::SandboxScalingData::GenerateDataForUnits<Unit, Unit>(Unit* attacker, Unit* target)\n+{\n+    // No scalable levels for any of them\n+    if (   (!attacker->ToCreature() || !attacker->ToCreature()->HasScalableLevels())\n+        && (!target->ToCreature()   || !target->ToCreature()->HasScalableLevels()))\n+        return false;\n+\n+    if (attacker->IsCreature() && target->IsPlayer())\n+        GenerateDataForUnits(attacker->ToCreature(), target->ToPlayer());\n+    else if (attacker->IsPlayer() && target->IsCreature())\n+        GenerateDataForUnits(attacker->ToPlayer(), target->ToCreature());\n+    else\n+        GenerateDataForUnits(attacker->ToCreature(), target->ToCreature());","path":"src/server/game/Server/Packets/SpellPackets.cpp","position":72,"original_position":72,"commit_id":"bbf23b453a54d9cdd538bfb34f67d4882d4f5897","original_commit_id":"bbf23b453a54d9cdd538bfb34f67d4882d4f5897","user":{"login":"Seyden","id":639817,"avatar_url":"https://avatars3.githubusercontent.com/u/639817?v=3","gravatar_id":"","url":"https://api.github.com/users/Seyden","html_url":"https://github.com/Seyden","followers_url":"https://api.github.com/users/Seyden/followers","following_url":"https://api.github.com/users/Seyden/following{/other_user}","gists_url":"https://api.github.com/users/Seyden/gists{/gist_id}","starred_url":"https://api.github.com/users/Seyden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seyden/subscriptions","organizations_url":"https://api.github.com/users/Seyden/orgs","repos_url":"https://api.github.com/users/Seyden/repos","events_url":"https://api.github.com/users/Seyden/events{/privacy}","received_events_url":"https://api.github.com/users/Seyden/received_events","type":"User","site_admin":false},"body":"Player to player is only in dungeons enabled","created_at":"2017-04-27T12:41:18Z","updated_at":"2017-04-27T12:41:18Z","html_url":"https://github.com/TrinityCore/TrinityCore/pull/19264#discussion_r113684820","pull_request_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264","_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/113684820"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/19264#discussion_r113684820"},"pull_request":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264"}}},"pull_request":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264","id":109925672,"html_url":"https://github.com/TrinityCore/TrinityCore/pull/19264","diff_url":"https://github.com/TrinityCore/TrinityCore/pull/19264.diff","patch_url":"https://github.com/TrinityCore/TrinityCore/pull/19264.patch","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19264","number":19264,"state":"open","locked":false,"title":"Core/Misc : Creature Scaling System","user":{"login":"Traesh","id":9392905,"avatar_url":"https://avatars3.githubusercontent.com/u/9392905?v=3","gravatar_id":"","url":"https://api.github.com/users/Traesh","html_url":"https://github.com/Traesh","followers_url":"https://api.github.com/users/Traesh/followers","following_url":"https://api.github.com/users/Traesh/following{/other_user}","gists_url":"https://api.github.com/users/Traesh/gists{/gist_id}","starred_url":"https://api.github.com/users/Traesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Traesh/subscriptions","organizations_url":"https://api.github.com/users/Traesh/orgs","repos_url":"https://api.github.com/users/Traesh/repos","events_url":"https://api.github.com/users/Traesh/events{/privacy}","received_events_url":"https://api.github.com/users/Traesh/received_events","type":"User","site_admin":false},"body":"**Changes proposed:**\r\n\r\n-  Implementing legion creature scaling system.\r\n- Add new table \"creature_template_scaling\" with scaling delta\r\n- If the creature has it's entry in \"creature_template_scaling\", the levels will scale between template.minlevel and template.maxlevel\r\n\r\n**Target branch(es):** 3.3.5/master\r\n\r\n- [ ] 3.3.5\r\n- [x] master\r\n\r\n**Issues addressed:** Closes #17898\r\n\r\n\r\n**Tests performed:**\r\nCompiled, tested ingame with NPC 23836\r\n\r\n`INSERT INTO creature_template_scaling VALUES (23836, 0);`\r\n\r\n**Known issues and TODO list:**","created_at":"2017-03-09T14:34:04Z","updated_at":"2017-04-27T12:41:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f9ac0a0ea6ed58c58a0ba9fb55e46cfb2e4027a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264/commits","review_comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264/comments","review_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19264/comments","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/bbf23b453a54d9cdd538bfb34f67d4882d4f5897","head":{"label":"Traesh:scaling","ref":"scaling","sha":"bbf23b453a54d9cdd538bfb34f67d4882d4f5897","user":{"login":"Traesh","id":9392905,"avatar_url":"https://avatars3.githubusercontent.com/u/9392905?v=3","gravatar_id":"","url":"https://api.github.com/users/Traesh","html_url":"https://github.com/Traesh","followers_url":"https://api.github.com/users/Traesh/followers","following_url":"https://api.github.com/users/Traesh/following{/other_user}","gists_url":"https://api.github.com/users/Traesh/gists{/gist_id}","starred_url":"https://api.github.com/users/Traesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Traesh/subscriptions","organizations_url":"https://api.github.com/users/Traesh/orgs","repos_url":"https://api.github.com/users/Traesh/repos","events_url":"https://api.github.com/users/Traesh/events{/privacy}","received_events_url":"https://api.github.com/users/Traesh/received_events","type":"User","site_admin":false},"repo":{"id":69283017,"name":"TrinityCore","full_name":"Traesh/TrinityCore","owner":{"login":"Traesh","id":9392905,"avatar_url":"https://avatars3.githubusercontent.com/u/9392905?v=3","gravatar_id":"","url":"https://api.github.com/users/Traesh","html_url":"https://github.com/Traesh","followers_url":"https://api.github.com/users/Traesh/followers","following_url":"https://api.github.com/users/Traesh/following{/other_user}","gists_url":"https://api.github.com/users/Traesh/gists{/gist_id}","starred_url":"https://api.github.com/users/Traesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Traesh/subscriptions","organizations_url":"https://api.github.com/users/Traesh/orgs","repos_url":"https://api.github.com/users/Traesh/repos","events_url":"https://api.github.com/users/Traesh/events{/privacy}","received_events_url":"https://api.github.com/users/Traesh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Traesh/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":true,"url":"https://api.github.com/repos/Traesh/TrinityCore","forks_url":"https://api.github.com/repos/Traesh/TrinityCore/forks","keys_url":"https://api.github.com/repos/Traesh/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Traesh/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Traesh/TrinityCore/teams","hooks_url":"https://api.github.com/repos/Traesh/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/Traesh/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/Traesh/TrinityCore/events","assignees_url":"https://api.github.com/repos/Traesh/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/Traesh/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/Traesh/TrinityCore/tags","blobs_url":"https://api.github.com/repos/Traesh/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Traesh/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Traesh/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Traesh/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Traesh/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Traesh/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/Traesh/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/Traesh/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/Traesh/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/Traesh/TrinityCore/subscription","commits_url":"https://api.github.com/repos/Traesh/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Traesh/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Traesh/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Traesh/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Traesh/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/Traesh/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Traesh/TrinityCore/merges","archive_url":"https://api.github.com/repos/Traesh/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Traesh/TrinityCore/downloads","issues_url":"https://api.github.com/repos/Traesh/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/Traesh/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Traesh/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Traesh/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Traesh/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/Traesh/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/Traesh/TrinityCore/deployments","created_at":"2016-09-26T19:01:21Z","updated_at":"2017-03-10T18:09:32Z","pushed_at":"2017-04-27T10:24:32Z","git_url":"git://github.com/Traesh/TrinityCore.git","ssh_url":"git@github.com:Traesh/TrinityCore.git","clone_url":"https://github.com/Traesh/TrinityCore.git","svn_url":"https://github.com/Traesh/TrinityCore","homepage":"http://www.trinitycore.org","size":415804,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"TrinityCore:master","ref":"master","sha":"6636ca8585f41aad9c984241506e63ba67d79576","user":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars0.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"repo":{"id":1204412,"name":"TrinityCore","full_name":"TrinityCore/TrinityCore","owner":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars0.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrinityCore/TrinityCore","description":"TrinityCore Open Source MMO Framework (master = 7.2.0.23937, 3.3.5 = 3.3.5a.12340)","fork":false,"url":"https://api.github.com/repos/TrinityCore/TrinityCore","forks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/forks","keys_url":"https://api.github.com/repos/TrinityCore/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrinityCore/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrinityCore/TrinityCore/teams","hooks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/events","assignees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/TrinityCore/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/tags","blobs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/TrinityCore/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscription","commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/TrinityCore/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrinityCore/TrinityCore/merges","archive_url":"https://api.github.com/repos/TrinityCore/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrinityCore/TrinityCore/downloads","issues_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/TrinityCore/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/TrinityCore/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/TrinityCore/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/deployments","created_at":"2010-12-28T23:40:07Z","updated_at":"2017-04-27T00:04:26Z","pushed_at":"2017-04-27T12:16:45Z","git_url":"git://github.com/TrinityCore/TrinityCore.git","ssh_url":"git@github.com:TrinityCore/TrinityCore.git","clone_url":"https://github.com/TrinityCore/TrinityCore.git","svn_url":"https://github.com/TrinityCore/TrinityCore","homepage":"http://www.trinitycore.org","size":435215,"stargazers_count":3767,"watchers_count":3767,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3757,"mirror_url":null,"open_issues_count":1307,"forks":3757,"open_issues":1307,"watchers":3767,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/19264"},"issue":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19264"},"comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19264/comments"},"review_comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264/comments"},"review_comment":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/19264/commits"},"statuses":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/bbf23b453a54d9cdd538bfb34f67d4882d4f5897"}}}}
{"actor":{"display_login":"Seyden"}}