Merge branch 'master' into Playerbot
This commit is contained in:
@@ -13,6 +13,10 @@ inputs:
|
|||||||
description: version tag to use for docker image
|
description: version tag to use for docker image
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
dockerfile:
|
||||||
|
description: dockerfile to use
|
||||||
|
required: false
|
||||||
|
default: apps/docker/Dockerfile
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -29,7 +33,7 @@ runs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: ${{ github.workspace }}
|
context: ${{ github.workspace }}
|
||||||
file: apps/docker/Dockerfile
|
file: ${{ inputs.dockerfile }}
|
||||||
push: ${{ inputs.push }}
|
push: ${{ inputs.push }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
target: ${{ inputs.component-name }}
|
target: ${{ inputs.component-name }}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
pull_request:
|
pull_request:
|
||||||
types: ['labeled', 'opened', 'synchronize', 'reopened']
|
types: ['opened', 'synchronize', 'reopened']
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
name: ${{ matrix.os }}-${{ matrix.compiler }}-nopch
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-nopch
|
||||||
env:
|
env:
|
||||||
COMPILER: ${{ matrix.compiler }}
|
COMPILER: ${{ matrix.compiler }}
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Cache
|
- name: Cache
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
pull_request:
|
pull_request:
|
||||||
types: ['labeled', 'opened', 'synchronize', 'reopened']
|
types: ['opened', 'synchronize', 'reopened']
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||||
|
|||||||
@@ -14,76 +14,19 @@ concurrency:
|
|||||||
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }})
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
RUNNING_ON_PRIMARY_BRANCH: |
|
||||||
|
${{ (github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master') && 'true' || 'false' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-build-n-deploy-dev:
|
build-containers:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
if: |
|
if: |
|
||||||
github.repository == 'azerothcore/azerothcore-wotlk'
|
github.repository == 'azerothcore/azerothcore-wotlk'
|
||||||
&& !github.event.pull_request.draft
|
&& !github.event.pull_request.draft
|
||||||
&& (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
|
&& (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
|
||||||
env:
|
|
||||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Free up disk space
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /usr/local/lib/android
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo rm -rf /opt/ghc
|
|
||||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
output=$(./acore.sh version | grep "AzerothCore Rev. ")
|
|
||||||
version=${output#"AzerothCore Rev. "}
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: acore/ac-wotlk-dev-server
|
|
||||||
tags: |
|
|
||||||
type=raw,value=${{ steps.version.outputs.version }}
|
|
||||||
type=ref,event=branch
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ${{ github.workspace }}
|
|
||||||
file: apps/docker/Dockerfile.dev-server
|
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
build-args: |
|
|
||||||
USER_ID=1000
|
|
||||||
GROUP_ID=1000
|
|
||||||
DOCKER_USER=acore
|
|
||||||
|
|
||||||
# TODO: rename this job
|
|
||||||
docker-build-n-deploy-prod:
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
if: |
|
|
||||||
github.repository == 'azerothcore/azerothcore-wotlk'
|
|
||||||
&& !github.event.pull_request.draft
|
|
||||||
&& (github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build')
|
|
||||||
env:
|
|
||||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Free up disk space
|
- name: Free up disk space
|
||||||
run: |
|
run: |
|
||||||
@@ -116,8 +59,7 @@ jobs:
|
|||||||
- name: Get version
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
output=$(./acore.sh version | grep "AzerothCore Rev. ")
|
version="$(jq -r '.version' acore.json)"
|
||||||
version=${output#"AzerothCore Rev. "}
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
@@ -128,45 +70,53 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
component-name: worldserver
|
component-name: worldserver
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
|
||||||
- name: build authserver
|
- name: build authserver
|
||||||
uses: ./.github/actions/docker-tag-and-build
|
uses: ./.github/actions/docker-tag-and-build
|
||||||
with:
|
with:
|
||||||
component-name: authserver
|
component-name: authserver
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
|
||||||
- name: build db-import
|
- name: build db-import
|
||||||
uses: ./.github/actions/docker-tag-and-build
|
uses: ./.github/actions/docker-tag-and-build
|
||||||
with:
|
with:
|
||||||
component-name: db-import
|
component-name: db-import
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
|
||||||
- name: build client-data
|
- name: build client-data
|
||||||
uses: ./.github/actions/docker-tag-and-build
|
uses: ./.github/actions/docker-tag-and-build
|
||||||
with:
|
with:
|
||||||
component-name: client-data
|
component-name: client-data
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
|
||||||
- name: build tools
|
- name: build tools
|
||||||
uses: ./.github/actions/docker-tag-and-build
|
uses: ./.github/actions/docker-tag-and-build
|
||||||
with:
|
with:
|
||||||
component-name: tools
|
component-name: tools
|
||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
push: ${{ github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master' }}
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
|
||||||
dispatch-acore-docker:
|
- name: build dev-server
|
||||||
needs: [ docker-build-n-deploy-prod , docker-build-n-deploy-dev]
|
uses: ./.github/actions/docker-tag-and-build
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
steps:
|
component-name: dev
|
||||||
- name: Repository Dispatch
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
push: ${{ env.RUNNING_ON_PRIMARY_BRANCH }}
|
||||||
|
dockerfile: apps/docker/Dockerfile.dev-server
|
||||||
|
|
||||||
|
- name: Trigger acore-docker CI
|
||||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
if: github.repository == 'azerothcore/azerothcore-wotlk' && github.ref_name == 'master'
|
||||||
uses: peter-evans/repository-dispatch@v2
|
uses: peter-evans/repository-dispatch@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }}
|
token: ${{ secrets.ACORE_DOCKER_REPO_ACCESS_TOKEN }}
|
||||||
repository: azerothcore/acore-docker
|
repository: azerothcore/acore-docker
|
||||||
event-type: azerothcore-new-images
|
event-type: azerothcore-new-images
|
||||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
client-payload: >
|
||||||
|
{
|
||||||
|
"ref": "${{ github.ref }}",
|
||||||
|
"sha": "${{ github.sha }}"
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- DB update 2024_01_08_01 -> 2024_01_08_02
|
||||||
|
--
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 18544);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(18544, 0, 0, 0, 1, 0, 100, 257, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 3832.74, 1448.12, -138.4, 0, 'Veraku - Out of Combat - Move To Position'),
|
||||||
|
(18544, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 0, 'Veraku - On Just Summoned - Start Attacking');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_challenge_veraku';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(34895, 'spell_challenge_veraku');
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2024_01_08_02 -> 2024_01_08_03
|
||||||
|
-- Fix Orgrimmar Grunt directions for barber shop
|
||||||
|
UPDATE `npc_text` SET `BroadcastTextID0` = 0 WHERE `ID` = 13889;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- DB update 2024_01_08_03 -> 2024_01_11_00
|
||||||
|
-- Update creature 28344 'Blazzle' with sniffed values
|
||||||
|
-- new spawns
|
||||||
|
DELETE FROM `creature` WHERE (`id1` = 28344) AND (`guid` IN (116));
|
||||||
|
INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
|
||||||
|
(116, 28344, 530, 1, 1, 0, 3063.40625, 3677.5703125, 142.7606658935546875, 4.276056766510009765, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL);
|
||||||
@@ -654,8 +654,12 @@ void ThreatMgr::ResetAllThreat()
|
|||||||
if (threatList.empty())
|
if (threatList.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (ThreatContainer::StorageType::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
for (HostileReference* ref : threatList)
|
||||||
(*itr)->SetThreat(0);
|
{
|
||||||
|
// Reset temp threat before setting threat back to 0.
|
||||||
|
ref->resetTempThreat();
|
||||||
|
ref->SetThreat(0.f);
|
||||||
|
}
|
||||||
|
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1670,8 +1670,8 @@ bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool ad
|
|||||||
// xinef: fix from db
|
// xinef: fix from db
|
||||||
if ((addToMap || gridLoad) && !data->overwrittenZ)
|
if ((addToMap || gridLoad) && !data->overwrittenZ)
|
||||||
{
|
{
|
||||||
float tz = map->GetHeight(data->posX, data->posY, data->posZ + 1.0f, true);
|
float tz = map->GetHeight(data->posX, data->posY, data->posZ + 0.42f, true);
|
||||||
if (tz >= data->posZ && tz - data->posZ <= 1.0f)
|
if (tz >= data->posZ && tz - data->posZ <= 0.42f)
|
||||||
const_cast<CreatureData*>(data)->posZ = tz + 0.1f;
|
const_cast<CreatureData*>(data)->posZ = tz + 0.1f;
|
||||||
|
|
||||||
const_cast<CreatureData*>(data)->overwrittenZ = true;
|
const_cast<CreatureData*>(data)->overwrittenZ = true;
|
||||||
|
|||||||
@@ -369,6 +369,14 @@ void ScriptMgr::OnPlayerLoadFromDB(Player* player)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptMgr::OnBeforePlayerLogout(Player* player)
|
||||||
|
{
|
||||||
|
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||||
|
{
|
||||||
|
script->OnBeforeLogout(player);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptMgr::OnPlayerLogout(Player* player)
|
void ScriptMgr::OnPlayerLogout(Player* player)
|
||||||
{
|
{
|
||||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||||
|
|||||||
@@ -133,6 +133,9 @@ public:
|
|||||||
// Called when a player logs in.
|
// Called when a player logs in.
|
||||||
virtual void OnLogin(Player* /*player*/) { }
|
virtual void OnLogin(Player* /*player*/) { }
|
||||||
|
|
||||||
|
// Called before the player is logged out
|
||||||
|
virtual void OnBeforeLogout(Player* /*player*/) { }
|
||||||
|
|
||||||
// Called when a player logs out.
|
// Called when a player logs out.
|
||||||
virtual void OnLogout(Player* /*player*/) { }
|
virtual void OnLogout(Player* /*player*/) { }
|
||||||
|
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ public: /* PlayerScript */
|
|||||||
void OnPlayerSpellCast(Player* player, Spell* spell, bool skipCheck);
|
void OnPlayerSpellCast(Player* player, Spell* spell, bool skipCheck);
|
||||||
void OnPlayerLogin(Player* player);
|
void OnPlayerLogin(Player* player);
|
||||||
void OnPlayerLoadFromDB(Player* player);
|
void OnPlayerLoadFromDB(Player* player);
|
||||||
|
void OnBeforePlayerLogout(Player* player);
|
||||||
void OnPlayerLogout(Player* player);
|
void OnPlayerLogout(Player* player);
|
||||||
void OnPlayerCreate(Player* player);
|
void OnPlayerCreate(Player* player);
|
||||||
void OnPlayerSave(Player* player);
|
void OnPlayerSave(Player* player);
|
||||||
|
|||||||
@@ -601,6 +601,9 @@ void WorldSession::LogoutPlayer(bool save)
|
|||||||
|
|
||||||
if (_player)
|
if (_player)
|
||||||
{
|
{
|
||||||
|
//! Call script hook before other logout events
|
||||||
|
sScriptMgr->OnBeforePlayerLogout(_player);
|
||||||
|
|
||||||
if (ObjectGuid lguid = _player->GetLootGUID())
|
if (ObjectGuid lguid = _player->GetLootGUID())
|
||||||
DoLootRelease(lguid);
|
DoLootRelease(lguid);
|
||||||
|
|
||||||
|
|||||||
@@ -515,7 +515,15 @@ class spell_pilgrims_bounty_feast_on_generic : public SpellScript
|
|||||||
enum tTracker
|
enum tTracker
|
||||||
{
|
{
|
||||||
SPELL_TURKEY_TRACKER = 62014,
|
SPELL_TURKEY_TRACKER = 62014,
|
||||||
SPELL_ACHI_TURKINATOR_CREDIT = 62021,
|
SPELL_ACHI_TURKINATOR_CREDIT = 62021
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Say
|
||||||
|
{
|
||||||
|
SAY_TURKEY_HUNTER = 33163,
|
||||||
|
SAY_TURKEY_DOMINATION = 33164,
|
||||||
|
SAY_TURKEY_SLAUGHTER = 33165,
|
||||||
|
SAY_TURKEY_TRIUMPH = 33167
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_pilgrims_bounty_turkey_tracker : public SpellScript
|
class spell_pilgrims_bounty_turkey_tracker : public SpellScript
|
||||||
@@ -532,16 +540,16 @@ class spell_pilgrims_bounty_turkey_tracker : public SpellScript
|
|||||||
switch (stackAmount)
|
switch (stackAmount)
|
||||||
{
|
{
|
||||||
case 10:
|
case 10:
|
||||||
target->TextEmote("Turkey Hunter!", target, true);
|
target->Whisper(SAY_TURKEY_HUNTER, target, true);
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
target->TextEmote("Turkey Domination!", target, true);
|
target->Whisper(SAY_TURKEY_DOMINATION, target, true);
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 30:
|
||||||
target->TextEmote("Turkey Slaughter!", target, true);
|
target->Whisper(SAY_TURKEY_SLAUGHTER, target, true);
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
target->TextEmote("TURKEY TRIUMPH!", target, true);
|
target->Whisper(SAY_TURKEY_TRIUMPH, target, true);
|
||||||
target->CastSpell(target, SPELL_ACHI_TURKINATOR_CREDIT, true);
|
target->CastSpell(target, SPELL_ACHI_TURKINATOR_CREDIT, true);
|
||||||
aurEff->GetBase()->Remove();
|
aurEff->GetBase()->Remove();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -950,6 +950,37 @@ class spell_q10190_battery_recharging_blaster_aura : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Veraku
|
||||||
|
{
|
||||||
|
NPC_VERAKU = 18544,
|
||||||
|
SPELL_CHALLENGE_VERAKU = 34895
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_challenge_veraku : public SpellScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PrepareSpellScript(spell_challenge_veraku);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*SpellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_CHALLENGE_VERAKU });
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellCastResult CheckRequirement()
|
||||||
|
{
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
if (Creature* veraku = caster->FindNearestCreature(NPC_VERAKU, 100.0f))
|
||||||
|
if (!veraku->HasAura(SPELL_CHALLENGE_VERAKU))
|
||||||
|
return SPELL_FAILED_CASTER_AURASTATE;
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnCheckCast += SpellCheckCastFn(spell_challenge_veraku::CheckRequirement);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_netherstorm()
|
void AddSC_netherstorm()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -962,5 +993,6 @@ void AddSC_netherstorm()
|
|||||||
new npc_bessy();
|
new npc_bessy();
|
||||||
new npc_maxx_a_million_escort();
|
new npc_maxx_a_million_escort();
|
||||||
RegisterSpellAndAuraScriptPair(spell_q10190_battery_recharging_blaster, spell_q10190_battery_recharging_blaster_aura);
|
RegisterSpellAndAuraScriptPair(spell_q10190_battery_recharging_blaster, spell_q10190_battery_recharging_blaster_aura);
|
||||||
|
RegisterSpellScript(spell_challenge_veraku);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -695,7 +695,8 @@ class spell_rog_pickpocket : public SpellScript
|
|||||||
|
|
||||||
enum vanish
|
enum vanish
|
||||||
{
|
{
|
||||||
SPELL_PARALYZE = 38132,
|
SPELL_STEALTH = 1784,
|
||||||
|
SPELL_PARALYZE = 38132,
|
||||||
SPELL_CLEAN_ESCAPE_AURA = 23582,
|
SPELL_CLEAN_ESCAPE_AURA = 23582,
|
||||||
SPELL_CLEAN_ESCAPE_HEAL = 23583
|
SPELL_CLEAN_ESCAPE_HEAL = 23583
|
||||||
};
|
};
|
||||||
@@ -742,8 +743,22 @@ class spell_rog_vanish : public SpellScript
|
|||||||
|
|
||||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (GetCaster() && GetCaster()->HasAura(SPELL_CLEAN_ESCAPE_AURA))
|
if (GetCaster())
|
||||||
GetCaster()->CastSpell(GetCaster(), SPELL_CLEAN_ESCAPE_HEAL, true);
|
{
|
||||||
|
GetCaster()->RemoveAurasByType(SPELL_AURA_MOD_STALKED);
|
||||||
|
|
||||||
|
if (!GetCaster()->HasAura(SPELL_STEALTH))
|
||||||
|
{
|
||||||
|
// Remove stealth cooldown if needed.
|
||||||
|
if (GetCaster()->IsPlayer() && GetCaster()->HasSpellCooldown(SPELL_STEALTH))
|
||||||
|
GetCaster()->ToPlayer()->RemoveSpellCooldown(SPELL_STEALTH);
|
||||||
|
|
||||||
|
GetCaster()->CastSpell(GetCaster(), SPELL_STEALTH, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetCaster()->HasAura(SPELL_CLEAN_ESCAPE_AURA))
|
||||||
|
GetCaster()->CastSpell(GetCaster(), SPELL_CLEAN_ESCAPE_HEAL, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
|
|||||||
Reference in New Issue
Block a user