Skip to content

Core/Scripts: Razorscale Rewrite#19828

Merged
Keader merged 13 commits into
TrinityCore:3.3.5from
Keader:razorscale
Aug 8, 2017
Merged

Core/Scripts: Razorscale Rewrite#19828
Keader merged 13 commits into
TrinityCore:3.3.5from
Keader:razorscale

Conversation

@Keader

@Keader Keader commented May 30, 2017

Copy link
Copy Markdown
Contributor

Changes proposed:

  • Fixed Harpoons behavior
  • Implemented Engineers behavior
  • Added Razorscale initial path
  • Added missing spells
  • Fixed Spell timers
  • Added missing spellscripts
  • Removed old hacks
  • Added DespawnAtEvade method
  • Updated codestyle
  • Added missing texts
  • Encounter fully rewritten

Target branch(es): 3.3.5

Issues addressed: Closes #13056, #19038

Tests performed: Builded and tested in game

Known issues and TODO list:

Many thanks to the good friends who helped me in this fight. ❤️

@ccrs

ccrs commented May 30, 2017

Copy link
Copy Markdown
Contributor
I tried leaving it as close to Blizzard as possible, but problems with the motion system do not allow the behavior to be fully copied

describe them

@Keader

Keader commented May 30, 2017

Copy link
Copy Markdown
Contributor Author

I can't set speed for only 1 movement like sniff shows.

I can't reproduce a movement with these flags:

 (MovementSpline) Flags: Flying, Catmullrom, Walkmode, Parabolic (35654144)
 (MovementMonsterSpline) (MovementSpline) Flags: Flying, Walkmode (2097664)


void JustDied(Unit* /*killer*/) override
void SpellHit(Unit* caster, SpellInfo const* spell) override

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp:503:29: fatal error: 
      unused parameter 'caster' [-Wunused-parameter]
        void SpellHit(Unit* caster, SpellInfo const* spell) override
                            ^

(33186,0,3,33282,606.2806,-137.2628,391.6004,4.537856,8,0); -- Razorscale Harpoon Fire State

DELETE FROM `gossip_menu_option` WHERE `menu_id`=10314;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the DB column names have changed recently :

DELETE FROM `gossip_menu_option` WHERE `MenuID`=10314;
INSERT INTO `gossip_menu_option` (`MenuID`,`OptionID`,`OptionIcon`,`OptionText`,`OptionBroadcastTextID`,`OptionType`,`OptionNpcFlag`,`ActionMenuID`,`ActionPoiID`,`BoxCoded`,`BoxMoney`,`BoxText`,`BoxBroadcastTextID`,`VerifiedBuild`) VALUES

(10314, 0, 0, 'We are ready to help!', 33353, 1, 1, 0, 0, 0, 0, '', 0, 0);

DELETE FROM `creature_text` WHERE `entry`=33210;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also :

DELETE FROM `creature_text` WHERE `CreatureID`=33210;
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why they changed it ? :(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • See commit d17a45e (2017-05-04 sql/updates/world/3.3.5/2017_05_04_00_world.sql) for creature_text changes.
  • See commit 5ff8601 (2017-05-04 sql/updates/world/3.3.5/2017_05_04_02_world.sql for gossip_menu and gossip_menu_option changes.

@codeman8214

Copy link
Copy Markdown

I don't think that is correct because of the state it is in

@ghost

ghost commented May 30, 2017

Copy link
Copy Markdown

OK, we may have to wait and see how travis-ci compiles this time. The previous compile included the SQL files, but for some reason they don't show up as part of the compile on my screen after the latest update.

@Keader

Keader commented May 30, 2017

Copy link
Copy Markdown
Contributor Author

@codeman8214 what ?!

@tkrokli you are a angel <3

@ghost

ghost commented May 30, 2017

Copy link
Copy Markdown

[ ... ] The previous compile included the SQL files, but for some reason they don't show up as part of the compile on my screen after the latest update.

https://www.traviscistatus.com/incidents/bnt2wtxpgs39

@codeman8214

codeman8214 commented May 31, 2017

Copy link
Copy Markdown

Looks good

@ariel-

ariel- commented May 31, 2017

Copy link
Copy Markdown
Contributor

I can't reproduce a movement with these flags:
(MovementSpline) Flags: Flying, Catmullrom, Walkmode, Parabolic (35654144)

The problem is here:

https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Movement/Spline/MoveSplineFlag.h#L101

Setting Flying will unset Catmullrom and viceversa.

@Shauren

Shauren commented May 31, 2017

Copy link
Copy Markdown
Member

@ariel- @Keader that sniff parse to me looks like a wod/legion wpp format with the substructures. If that is the case then you need to remember that spline flag combinations are different between 3.3.5 and cataclysm+ (starting with cata they are mostly the same until latest version). In 3.3.5 flying & catmullrom are never together but in legion they can be (and also the wpp enum is slightly outdated for legion flags)

@Keader

Keader commented Jun 1, 2017

Copy link
Copy Markdown
Contributor Author

@ccrs why we dont have some function that allow pass custom MoveSpline, and pass flags to MoveSpline?
e.g.

Movement::MoveSplineInit init(me);
init.SetVelocity(21.f);
init.MoveTo(RazorscalePoints[0]);
init.SetFlags(Movement::MoveSplineFlag::Flying | Movement::MoveSplineFlag::Walkmode);
me->GetMotionMaster()->MoveCustomSpline(POINT_COMBAT, init);

I need reproduce this packet:

ServerToClient: SMSG_ON_MONSTER_MOVE (0x2DA2) Length: 91 ConnIdx: 1 Time: 03/26/2017 11:20:40.146 Number: 5269
MoverGUID: Entry: 33186 (Razorscale) Low: 
Position: X: 585.361 Y: -173.5592 Z: 456.843
(MovementMonsterSpline) Id: 5290
(MovementMonsterSpline) Destination: X: 0 Y: 0 Z: 0
(MovementMonsterSpline) CrzTeleport: False
(MovementMonsterSpline) StopDistanceTolerance: 0
(MovementMonsterSpline) (MovementSpline) Flags: Flying, Walkmode (2097664)
(MovementMonsterSpline) (MovementSpline) AnimTier: 0
(MovementMonsterSpline) (MovementSpline) TierTransStartTime: 0
(MovementMonsterSpline) (MovementSpline) Elapsed: 0
(MovementMonsterSpline) (MovementSpline) MoveTime: 1209
(MovementMonsterSpline) (MovementSpline) JumpGravity: 0
(MovementMonsterSpline) (MovementSpline) SpecialTime: 0
(MovementMonsterSpline) (MovementSpline) Mode: 0
(MovementMonsterSpline) (MovementSpline) VehicleExitVoluntary: 0
(MovementMonsterSpline) (MovementSpline) TransportGUID: Full: 0x0
(MovementMonsterSpline) (MovementSpline) VehicleSeat: -1
(MovementMonsterSpline) (MovementSpline) Face: 0
(MovementMonsterSpline) (MovementSpline) PointsCount: 1
(MovementMonsterSpline) (MovementSpline) PackedDeltasCount: 0
(MovementMonsterSpline) (MovementSpline) HasSplineFilter: False
(MovementMonsterSpline) (MovementSpline) HasSpellEffectExtraData: False
(MovementMonsterSpline) (MovementSpline) [0] Points: X: 585.401 Y: -173.543 Z: 408.508

About issue

After wipe, he lost the "fly" animation and started walking in the air. When it happens and when MotionMaster()->MovePoint() is called, he starts to "teleport" instead of walk/fly. I really don't know how to fix it.

After wipe (in perma_ground_phase) he lose flying animation and start "walk in the air"
even i'm forcing me->SetCanFly(true); and me->SetDisableGravity(true); On reset, and init.SetFly() in Spline

@Shauren

Shauren commented Jun 1, 2017

Copy link
Copy Markdown
Member

Walkmode name is wrong and has already been renamed in master (applies to 3.3.5 too) - this flag means CanSwim
Flying is set automatically be spline when DisableGravity or CanFly are enabled

@ccrs

ccrs commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

what sharuen said + you can always send your spline and use a placeholder movement to keep it like movepoint with charge id (check gunship battle)

@Riztazz

Riztazz commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Creature/Creature.cpp#L2913

Add that flag and handle movement flags and stuff within script, this part of code is probably overwriting your stuff

@Keader

Keader commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

yay, something is wrong (idk if is core issue, or i fuckedup something)
but using:

DummyEntryCheckPredicate pred;
summons.DoAction(ACTION_START_FIGHT, pred);

This action ACTION_START_FIGHT is not getted for any creature in summon list
i put comments in DoAction method to all summon and is not called

@ariel-

ariel- commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Because SummonList::DoAction has a third optional parameter, max list size, defaults 0 and it resizes the list to 0 elements basically never triggering the event for any summons :c

EDIT: Almost, this relied on Trinity::Containers::RandomResize (predicate version) to not resize the list if size 0 is passed, this was changed perhaps unintentionally when doing the Containers refactor.

@ariel-

ariel- commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Rebase on 8188511 to get rid of the DoAction bug

@ccrs

ccrs commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

we can erase the "movement sytem is bugged" cloud now 💃

#include "ObjectAccessor.h"
#include "PassiveAI.h"
#include "PathGenerator.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't see what you need PathGenerator for

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without it, i got error in:

uint32 const pathSize = 11;
G3D::Vector3 const RazorscalePath[pathSize] =

"Error (active) incomplete type is not allowed scripts_northrend c:\Users\Bradley\Documents\Trinity\src\server\scripts\Northrend\Ulduar\Ulduar\boss_razorscale.cpp 279
"

@Keader Keader Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be changed to #include <G3D/Vector3.h> right?
And what the rule to put this includes? alphabetical order?

@ariel- ariel- Jun 22, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and yes (with ScriptMgr.h first)

const Position RazorFlight = { 588.050f, -251.191f, 470.536f, 1.498f };
const Position RazorGround = { 586.966f, -175.534f, GROUND_Z, 4.682f };
const Position PosEngSpawn = { 591.951f, -95.9680f, GROUND_Z, 0.000f };
const Position RazorFlightPosition = { 585.3610f, -173.5592f, 456.8430f, 1.526665f };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Position const (codestyle and consistency with rest of consts)

@Keader

Keader commented Aug 5, 2017

Copy link
Copy Markdown
Contributor Author

i'm thinking about merge it...
Using wrong spawn point (currently spawn point) and not using path part, until have a way to change object distance view...

@ghost

ghost commented Aug 5, 2017

Copy link
Copy Markdown

Oh, right. I almost thought this was merged already.

@ccrs

ccrs commented Aug 5, 2017

Copy link
Copy Markdown
Contributor

also the bug that made the fire chase players is solved, u can remove the ai

@Keader

Keader commented Aug 6, 2017

Copy link
Copy Markdown
Contributor Author

ok ccrs, i will do it tomorrow morning, ty.

@Keader Keader merged commit d825a06 into TrinityCore:3.3.5 Aug 8, 2017
@Keader Keader deleted the razorscale branch August 8, 2017 00:40
Shauren pushed a commit that referenced this pull request Aug 22, 2020
Nyeriah pushed a commit to Nyeriah/azerothcore-wotlk that referenced this pull request Feb 24, 2026
…cale

Replace all harpoon fire state creature GUID lookups with spatial
proximity searches (FindNearestCreature/GetCreaturesWithEntryInRange)
and GO entry-based spell selection, inspired by TrinityCore's
Razorscale rewrite (TrinityCore/TrinityCore#19828).

- boss_razorscale: Remove SPELL_LAUNCH_CHAIN handler that matched
  caster GUIDs; chain spells are now cast directly by the fire state
  creature. Use GetCreaturesWithEntryInRange for EVENT_FLY_UP harpoon
  reset instead of iterating instance GUID data.
- npc_ulduar_harpoonfirestate: Replace GetGuidData identity checks
  with FindNearestGameObject proximity + X-position fallback to
  determine which harpoon gun corresponds to this creature. Cast the
  chain spell directly on Razorscale instead of SPELL_LAUNCH_CHAIN.
- go_ulduar_working_harpoon: Use FindNearestCreature to locate the
  nearby fire state NPC instead of instance GUID lookup. Map GO entry
  to chain spell directly.
- npc_ulduar_expedition_commander: Use GetCreaturesWithEntryInRange
  to reset fire state NPCs on encounter start.
- npc_ulduar_expedition_engineer: Use GetCreaturesWithEntryInRange
  to find unrepaired harpoons instead of instance GUID iteration.
- instance_ulduar: Remove m_RazorscaleHarpoonFireStateGUID storage
  and associated OnCreatureCreate/GetGuidData handlers.
- ulduar.h: Remove DATA_HARPOON_FIRE_STATE_1-4 constants.

Based on TrinityCore/TrinityCore#19828 by Keader (Lucas Nascimento).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Nyeriah pushed a commit to Nyeriah/azerothcore-wotlk that referenced this pull request Feb 24, 2026
…cale

Replace all harpoon fire state creature GUID lookups with spatial
proximity searches (FindNearestCreature/GetCreaturesWithEntryInRange)
and GO entry-based spell selection, inspired by TrinityCore's
Razorscale rewrite (TrinityCore/TrinityCore#19828).

- boss_razorscale: Remove SPELL_LAUNCH_CHAIN handler that matched
  caster GUIDs; chain spells are now cast directly by the fire state
  creature. Use GetCreaturesWithEntryInRange for EVENT_FLY_UP harpoon
  reset instead of iterating instance GUID data.
- npc_ulduar_harpoonfirestate: Replace GetGuidData identity checks
  with FindNearestGameObject proximity + X-position fallback to
  determine which harpoon gun corresponds to this creature. Cast the
  chain spell directly on Razorscale instead of SPELL_LAUNCH_CHAIN.
- go_ulduar_working_harpoon: Use FindNearestCreature to locate the
  nearby fire state NPC instead of instance GUID lookup. Map GO entry
  to chain spell directly.
- npc_ulduar_expedition_commander: Use GetCreaturesWithEntryInRange
  to reset fire state NPCs on encounter start.
- npc_ulduar_expedition_engineer: Use GetCreaturesWithEntryInRange
  to find unrepaired harpoons instead of instance GUID iteration.
- instance_ulduar: Remove m_RazorscaleHarpoonFireStateGUID storage
  and associated OnCreatureCreate/GetGuidData handlers.
- ulduar.h: Remove DATA_HARPOON_FIRE_STATE_1-4 constants.

Based on TrinityCore/TrinityCore#19828 by Keader (Lucas Nascimento).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants