Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CORE/OPvP): Halaa Mechanics not working properly #14428

Closed
wants to merge 17 commits into from

Conversation

Valdifer
Copy link
Contributor

@Valdifer Valdifer commented Dec 30, 2022

Changes Proposed:

  • Make Halaa mechanics Blizzlike

Issues Addressed:

SOURCE:

Tests Performed:

  • Under testing

How to Test the Changes:

  1. .tele halaa
  2. capture it Horde/Alliance
  3. change to opposite faction
  4. try capture it

Known Issues and TODO List:

  • [ Bombs still not working properly making guards get the DOT]
  • [ Ghost Alliance guard not changed ]
  • [ Messages in channel defense still not done ]
  • [ When there is no guards, can be fully captured only at max points ]
  • [ All dead players can spawn in Halaa when it should be by TEAM_CONTROLLER (Happens only when server is restarted) ]
  • [ Guards patrolling waypoints ] PARTIALLY (Have to check why Vendors doesnt appear)
  • [ Flags players when interact with Roosts ]
  • [ Capture area very big (Can be captured down the hill) ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

Fixes Halaa can be captured with all the guards alive

azerothcore#14355

Valdifer
@Yehonal Yehonal added CORE Related to the core file-cpp Used to trigger the matrix build Script labels Dec 30, 2022
@Valdifer
Copy link
Contributor Author

Could be this still WIP¿?

@LukasVolgger LukasVolgger added the WIP Work in Progress. label Dec 30, 2022
@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 2, 2023

After taking a look into this, OutdoorPvP global class its the called by all OutdoorPVPScripts, all of them override the Update Method, in that method all of them call the global Update from OutdoorPvP global class and get a bool returned, the thing is Halaa works "different". I mean, when all OutdoorPvP have to be updated every time one player is in the area in halaa there is 2 things:

  • 1º It is capturable only when 15 guards are defeated
  • 2º the progress bar (Slider) has to be increasing while one faction has it captured including the guards are on but not to the opposite faction (If someone can me this, coz i have now a WoW acc but Halaa is captured by Horde and cant see if that works like that)
    If Halaa works like i think, right now how the code is made it is impossible if you call always the global Update Method, that can't happen because the global OutdoorPvP class has the logic to administrate the points, and if you call the update global method the slider will get updated too and the points bypassing guards, so there are 2 solutions:
    One; modifying the global OutdoorPvP Update to see if it is Halaa GO and if it is Halaa make the logic works different (Dunno if this should be a good option)
    Two; Make Halaa OutdoorPvP Class be different changing all the Update to not affect the rest of classes

Thats the thing i saw, if someone has a better idea or see another way tell me and i can take a look but now i tryed a lot of things to afford that and i need confirmation from official WoW.

Another important thing, the fire DOT i tryed to fix it with spellfix but didn't work at all, guards got DOT but after 1 second dissapeared (Still dunno too much spells but now more than before), so after that i saw the real problem.
If you throw a bomb and you have a player there the player GETS the debuff meanwhile the Guards no, that means they are resetting the debuf because they are exiting from combat, so probably they are getting the EVADE mode or something, so the solution i see to this is hardcode the Creature_template ids to bypass that and let them get the DOT and don't remove it if they exit combat (Or dunno if by flags in DB or something can be solved)

Horde NPC: 18192
Alliance NPC: 18256

If im wrong correct me or discuss im open to see what you think guys and thanks for let me fix the Halaa :D

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 3, 2023

The DOT Damage is fixed now

I have to check official Blizzard because i saw there is 4 guards making patrols with waypoints.

I made to work Halaa when u have captured it still progressing only the controller faction, but is working doing the thing i said above but i need to confirm that is working as i say.

I need sniff the patrols to see how they patrol halaa and see the mechanics of halaa in official blizzard, if someone knows how it works or have a Clue would be awesome

@Gultask
Copy link
Contributor

Gultask commented Jan 4, 2023

Yeah we can check waypoints no problem.

@Valdifer , btw, interacting with the Roosts, even the destroyed ones, should flag players for PvP, is that a thing currently?

Sorry I'm not up to speed with Halaa, I'll help with if I can here with research. The main problem I'm having is that the Classic PTR is down atm.

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 4, 2023

Yes, interacting with them flag you for PvP but only when you get the flying spell
image
in case of destroying doesnt tag you
image

I have to check in official after reset or PTR but the hours for reset to see halaa neutral are so hard for me, the thing i can see now is the patrols and capturing halaa seeing how its working but trying to capture halaa alone when someone is going to pvp you is hard :/ no one is gonna let me see the mechanic xD.

Right now Halaa is "playable" but not 100% blizzlike and i want to be sure is going to be 100% blizzlike if i can confirm those things.

The thing i would like to see is when there is no guards there is a MSG that says halaa is defenseless and after that one friend told me the guards doesnt respawn UNTIL is full captured, i need confirm that because that changes everything, i need more testing there.

Thx for the help, if i see something new i will post it here

@Gultask
Copy link
Contributor

Gultask commented Jan 4, 2023

Here's the waypoints:

SET @NPC := XXXXXX;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-1578.2544,`position_y`=7942.152,`position_z`=-22.726915 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,-1578.2544,7942.152,-22.726915,NULL,0,0,0,100,0),
(@PATH,2,-1604.801,7950.809,-26.352486,NULL,0,0,0,100,0),
(@PATH,3,-1618.2837,7972.56,-24.741226,NULL,0,0,0,100,0),
(@PATH,4,-1620.6606,7986.165,-24.407974,NULL,0,0,0,100,0),
(@PATH,5,-1627.0247,7987.222,-24.741226,NULL,7500,0,0,100,0),
(@PATH,6,-1616.4249,7964.83,-26.525581,NULL,0,0,0,100,0),
(@PATH,7,-1593.1031,7986.29,-23.556028,NULL,0,0,0,100,0),
(@PATH,8,-1560.4299,7990.434,-21.372875,NULL,7500,0,0,100,0),
(@PATH,9,-1563.902,7951.0166,-22.608301,NULL,0,0,0,100,0),
(@PATH,10,-1544.69,7929.014,-21.267084,NULL,7500,0,0,100,0),
(@PATH,11,-1525.14,7920.1685,-20.322586,NULL,0,0,0,100,0),
(@PATH,12,-1548.2592,7915.58,-21.267084,NULL,0,0,0,100,0),
(@PATH,13,-1561.5724,7908.538,-21.979242,NULL,0,0,0,100,0),
(@PATH,14,-1567.437,7901.1885,-21.979645,NULL,7500,0,0,100,0),
(@PATH,15,-1570.1881,7924.743,-22.589752,NULL,0,0,0,100,0);
SET @NPC := XXXXXX;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-1601.5521,`position_y`=7950.475,`position_z`=-25.48774 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,-1601.5521,7950.475,-25.48774,NULL,0,0,0,100,0),
(@PATH,2,-1605.7198,7958.928,-25.589912,NULL,0,0,0,100,0),
(@PATH,3,-1603.0267,7970.598,-24.292007,NULL,0,0,0,100,0),
(@PATH,4,-1597.1958,7988.6084,-23.727415,NULL,0,0,0,100,0),
(@PATH,5,-1563.0417,7984.9004,-21.805859,NULL,0,0,0,100,0),
(@PATH,6,-1552.0924,7971.6025,-21.340649,NULL,0,0,0,100,0),
(@PATH,7,-1552.6584,7939.8413,-21.864893,NULL,0,0,0,100,0),
(@PATH,8,-1559.9021,7927.2256,-21.687494,NULL,0,0,0,100,0),
(@PATH,9,-1580.1727,7940.029,-23.01732,NULL,0,0,0,100,0);
SET @NPC := XXXXXX;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-1611.6683,`position_y`=7957.6304,`position_z`=-27.328438 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,-1611.6683,7957.6304,-27.328438,NULL,0,0,0,100,0),
(@PATH,2,-1618.0887,7983.4497,-24.41481,NULL,0,0,0,100,0),
(@PATH,3,-1643.7819,7986.462,-25.064526,NULL,0,0,0,100,0),
(@PATH,4,-1643.5465,7995.867,-25.810375,NULL,0,0,0,100,0),
(@PATH,5,-1611.7173,7997.099,-24.491226,NULL,0,0,0,100,0),
(@PATH,6,-1583.7445,7990.3584,-23.042845,NULL,0,0,0,100,0),
(@PATH,7,-1560.121,7988.5166,-21.37434,NULL,0,0,0,100,0),
(@PATH,8,-1556.1189,7971.6978,-21.897045,NULL,0,0,0,100,0),
(@PATH,9,-1549.7915,7950.7188,-21.270655,NULL,0,0,0,100,0),
(@PATH,10,-1552.4308,7934.078,-21.739405,NULL,0,0,0,100,0),
(@PATH,11,-1519.6771,7925.7915,-20.246414,NULL,0,0,0,100,0),
(@PATH,12,-1500.88,7916.9707,-19.072586,NULL,0,0,0,100,0),
(@PATH,13,-1509.5591,7915.889,-19.447586,NULL,0,0,0,100,0),
(@PATH,14,-1538.3795,7922.952,-21.060053,NULL,0,0,0,100,0),
(@PATH,15,-1562.6403,7908.5366,-21.892084,NULL,0,0,0,100,0),
(@PATH,16,-1582.8197,7893.7847,-22.548172,NULL,0,0,0,100,0),
(@PATH,17,-1598.5696,7887.1675,-24.116043,NULL,0,0,0,100,0),
(@PATH,18,-1582.957,7910.1274,-24.712067,NULL,0,0,0,100,0),
(@PATH,19,-1582.636,7940.633,-23.45592,NULL,0,0,0,100,0),
(@PATH,20,-1604.9592,7940.441,-26.098213,NULL,0,0,0,100,0),
(@PATH,21,-1631.5454,7947.5947,-35.980537,NULL,0,0,0,100,0);
SET @NPC := XXXXXX;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-1593.7784,`position_y`=7988.3916,`position_z`=-23.511473 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,-1593.7784,7988.3916,-23.511473,NULL,0,0,0,100,0),
(@PATH,2,-1559.4581,7970.869,-22.18391,NULL,0,0,0,100,0),
(@PATH,3,-1554.2388,7945.5103,-22.054346,NULL,0,0,0,100,0),
(@PATH,4,-1564.365,7929.291,-21.630976,NULL,0,0,0,100,0),
(@PATH,5,-1586.477,7942.994,-24.06981,NULL,0,0,0,100,0),
(@PATH,6,-1614.7969,7949.1113,-29.484688,NULL,0,0,0,100,0),
(@PATH,7,-1619.6309,7963.3203,-27.734688,NULL,0,0,0,100,0),
(@PATH,8,-1607.4355,7971.2866,-24.57106,NULL,0,0,0,100,0);

@Gultask
Copy link
Contributor

Gultask commented Jan 4, 2023

The thing i would like to see is when there is no guards there is a MSG that says halaa is defenseless and after that one friend told me the guards doesnt respawn UNTIL is full captured, i need confirm that because that changes everything, i need more testing there.

I tested that in Retail but unfortunately forgot to record it. When it's not captured by anyone (after a server reset) the flag is NEUTRAL and must be FULLY CAPTURED. Only after it is fully captured that the guards will spawn.

So after a server restart it's a free-for-all.

And the flag happens when I click the roost (destroyed or not)

@Gultask
Copy link
Contributor

Gultask commented Jan 4, 2023

It seems to me like the NPCs aren't spawned properly. A lot of them wander when they shouldn't.

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 4, 2023

Thx for all that info Gultask, then that my friend told me is true, now i have an idea what to do, there is more things to fix i found (When you die all players spawn in Halaa GY when it should be only by Halaa owners)

@Gultask
Copy link
Contributor

Gultask commented Jan 4, 2023

Controlling faction:
image

Opposing faction:
image

@Gultask
Copy link
Contributor

Gultask commented Jan 5, 2023

Let me know if you need anything else. I'm not very knowledgeable on PvP 😛

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 5, 2023

Let me know if you need anything else. I'm not very knowledgeable on PvP 😛

Thx 😃, right now im ok, i got this, you helped me a lot 😃, i'll finish when i come back to home

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 5, 2023

Done capturing halaa when full bar, gonna test it to see if it works right now with both factions and after reset before upload

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 6, 2023

Still need to clean some code from the global update, because i copied and adapted it to halaa mechanics and prolly there is some parts of code that are useless, and more test with the respawn guards

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 7, 2023

I have been tested it and for now i didn't found any errors (Now seems to works more like blizzlike), the thing i still don't get is the waypoints, i have them thx to gultask but when i do: SELECT * FROM creature WHERE guid = 3110435 (One of the guards)
doesnt seems to have a result, so i suppose i have to create it and make the rest? the guid it is from .npc info in-game

I think i got it, saw something in the code, tomorrow i check, i will continue posting updates

@Valdifer
Copy link
Contributor Author

Still WIP, not abandoned, just leveling a 80 in blizzard WoW, taking advantage 50% exp

@heyitsbench
Copy link
Contributor

Still WIP, not abandoned, just leveling a 80 in blizzard WoW, taking advantage 50% exp

Feel free to mark the PR as a draft until it's ready, we can wait. 😉

@Valdifer Valdifer marked this pull request as draft January 15, 2023 10:06
Indicating is Fire Bomb from halaa
@acidmanifesto
Copy link
Contributor

image

removed whitespaces
removed whitespaces (Still WIP because the mechanic of respawn it is not how it works in Blizz)
@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 25, 2023

Ok, i tested waypoints but i have to test more the mobs because all of them are generated by a general method to add spawns to cell and there is no Waypoints using that method so i have to change some things to make guards do patrols

@Gultask
Copy link
Contributor

Gultask commented Jan 25, 2023

Unfortunately I can't help there. I don't know much about the cpp part of the Core.
Also, just a heads up. The guards that don't patrol are stationary.
I'll try to get the exact coords for you soon-ish. Ping me if I don't, please.

@Nyeriah
Copy link
Member

Nyeriah commented Jan 25, 2023

Have a look at TrinityCore/TrinityCore@b5194a1

@Valdifer
Copy link
Contributor Author

Valdifer commented Jan 25, 2023

Unfortunately I can't help there. I don't know much about the cpp part of the Core. Also, just a heads up. The guards that don't patrol are stationary. I'll try to get the exact coords for you soon-ish. Ping me if I don't, please.

As far i saw the positions of them are correct except for 2 of them but i was taking a look and sniffing Halaa in blizzard and got all positions, positions are ok

Have a look at TrinityCore/TrinityCore@b5194a1

I will test to see the difference between spellinfocorrection and that

@Valdifer
Copy link
Contributor Author

Tested now, debuff dissapear, with the spellinfocorrection works and the dot doesnt get debuffed after throw the bomb, before it was working ok.

But thx to that i can add a SQL script to fix that spell and we can avoid the spellinfocorrection :)

@yehonal-bot yehonal-bot added the DB related to the SQL database label Jan 25, 2023
@Valdifer
Copy link
Contributor Author

Valdifer commented Feb 1, 2023

Still doing it, now i think got how to do it through DB and not use Hardcode NPCs (I want to avoid this cos through DB for me its better than insert the code in the classes)

@Valdifer
Copy link
Contributor Author

Valdifer commented Feb 26, 2023

image
Dunno why i cant get the DB creatures, dunno how to get them and adding to creatureTypes in OPvP, i saw a method to get the id from creature table but the notes says its only for custom modules so im skipping that way

EDIT: Finally after reading something in the code and searching found this:
image

and i got all the NPCS, now i can make the rest

@Valdifer
Copy link
Contributor Author

Valdifer commented Mar 21, 2023

After some tests, rewriting logic, finally i made it working but i have now a new problem, there are 5 NPCS that didn't spawn and i got this into the console

image

im removing creatures and updating the id1 data in code (SQL is not changed), server is working without problems but still getting that console error, dunno if that console msg is a problem

Edit: Solved it, and the console errors too, finally working npcs patrolling, i have to do more tests, thx for the patience guys and sry, i had some thing to do and i delayed this

@Valdifer
Copy link
Contributor Author

Valdifer commented Mar 28, 2023

I need some feedback to see if i have to change this coz using this options from worldserver.conf

PreloadAllNonInstancedMapGrids = 1
SetAllCreaturesWithWaypointMovementActive = 1

The server is crashing, but the map that is crashing is 581 (Northrend), so 530 isn't crashing, anyway i need feedback to see if i should change this guys to something better (Like hardcode waypoints)

@Valdifer
Copy link
Contributor Author

I think im gonna open it in a new PR coz seems i did something wrong with the update with objmgr

@Valdifer Valdifer closed this Mar 28, 2023
@Valdifer Valdifer deleted the fix-issue-NAHalaaMechanic branch March 28, 2023 12:09
@Valdifer
Copy link
Contributor Author

Here: #15634

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE Related to the core DB related to the SQL database file-cpp Used to trigger the matrix build Script WIP Work in Progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Halaa mechanics not working properly Halaa Issues
9 participants