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

[WIP] Scourge invasion Event Rework #1717

Open
wants to merge 73 commits into
base: development
Choose a base branch
from

Conversation

Oroxzy
Copy link
Member

@Oroxzy Oroxzy commented Dec 2, 2022

grafik

Reason

Extreme adjustments to behave exactly like the original (even better because our city attacks are not bugged...) and move everything into the database if possible.

Quick explanation

This is how the event works now with these changes:

GameEvent 17 adds all Quest NPCs and GameObjects for Cities and Light's Hope Chapel to the Map.
It also spawns the City attack NPCs and Bosses in Dungeons.

    GAME_EVENT_SCOURGE_INVASION                         = 17,

It also summons the NPC "Mouth of Kel'thuzad" in every invasion Zone.
This NPC controls and handles the attacked zones. He contains the only Hardcoded Script beside some Gossips and Qest stuff.
Each Invasion Zone has a seperated GameEvent:

    GAME_EVENT_SCOURGE_INVASION_WINTERSPRING            = 90,
    GAME_EVENT_SCOURGE_INVASION_TANARIS                 = 91,
    GAME_EVENT_SCOURGE_INVASION_AZSHARA                 = 92,
    GAME_EVENT_SCOURGE_INVASION_BLASTED_LANDS           = 93,
    GAME_EVENT_SCOURGE_INVASION_EASTERN_PLAGUELANDS     = 94,
    GAME_EVENT_SCOURGE_INVASION_BURNING_STEPPES         = 95,

Every event spawns the NPCs and GameObjects in it's zone.

If all Necropolises in the Zone are destroyed, the Mouth of Kel'thuzad NPC stops the Game Event at his defeated zone and has a configurable timer to start it again at some point.

TODO

  • Fix issue with Spawn Spell 28234, which makes npcs immune to damage somehow.

  • Removed almost all of the horrible Hardcoded stuff and moving things to DB.

  • City attacks and Flameshocker random spawns like it should be.

  • Much more accurate invasion camp spawn mechanics.
    https://www.youtube.com/watch?v=tkrFymyC9v4&feature=youtu.be

  • Corrected many spell timers.

  • Respawn Low level minions outside cities with correct groups and respawn timers.

  • Make zone invasion timers and max attackable zones configurable.

  • Pooling invasion camps skullpiles.
    grafik

  • Solve Spawn Mechanism.

How can i solve this?

  • Necrotic Shard is casting spell 27885 every 5 seconds.
  • This spell should activate the 3 nearest invisible GameObjects (181111,181155,181156)
  • Activating the object has the consequence that the further process is activated so that a scourge minion is spawned in the place of the object, which has nothing to do with solving this problem here.
  • Activating the Gameobject also despawns and respawns it after xxx seconds.
  • The Issue is: The Code in Spell.cpp Line 2642 to 2649 does not ignore despawned Objects. It always take the 3 nearsest Objects and doesn't ignore the despawned ones, this means that only 3 minions will spawn around the necrotic shard.
  • If i add if (iter->isSpawned()) it works but it may break several other scripts, which should target non-spawned objects.

https://github.com/vmangos/core/blob/b8616cbfb212d52f70b79593ea1ce8c8fbce51dd/src/game/Spells/Spell.cpp#L2642C1-L2649C14

Im dumb please help! :p

}
}

if (!tempTargetGOList.empty())
{
for (const auto& iter : tempTargetGOList)
AddGOTarget(iter, effIndex);
{
if (iter->isSpawned()) // Makes sense?
Copy link
Contributor

Choose a reason for hiding this comment

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

you can assign condition in db for isSpawned, its already used for other spells

@@ -1256,7 +1256,7 @@ Rate.Creature.Aggro = 1
MaxCreaturesAttackRadius = 40
MaxPlayersStealthDetectRange = 30
MaxCreaturesStealthDetectRange = 30
MaxCreatureSummonLimit = 100
MaxCreatureSummonLimit = 200
Copy link
Contributor

Choose a reason for hiding this comment

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

increase limit for specific sources you need it to be higher for, not globally

@Kittnz
Copy link
Contributor

Kittnz commented Jun 18, 2023

@Oroxzy what are the minor stuff to fix?

@Oroxzy
Copy link
Member Author

Oroxzy commented Jun 23, 2023

@Oroxzy what are the minor stuff to fix?

I mentioned it in more detail above, under the TODO list

INSERT INTO `spell_mod` (`Id`, `procChance`, `procFlags`, `procCharges`, `DurationIndex`, `Category`, `CastingTimeIndex`, `StackAmount`, `SpellIconID`, `activeIconID`, `manaCost`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `Custom`, `InterruptFlags`, `AuraInterruptFlags`, `ChannelInterruptFlags`, `Dispel`, `Stances`, `StancesNot`, `SpellVisual`, `ManaCostPercentage`, `StartRecoveryCategory`, `StartRecoveryTime`, `MaxAffectedTargets`, `MaxTargetLevel`, `DmgClass`, `rangeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `SpellFamilyName`, `SpellFamilyFlags`, `Mechanic`, `EquippedItemClass`, `Comment`) VALUES
(28032, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, NULL),
(28056, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, NULL),
(28041, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why editing these spells? No comment provided in the insert.

These spells must ignore armor in order to function correctly
@0blu 0blu added SQL A issue / PR which references SQL code CPP A issue / PR which references CPP code labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CPP A issue / PR which references CPP code SQL A issue / PR which references SQL code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants