Skip to content

Conversation

@meji46
Copy link
Member

@meji46 meji46 commented Sep 16, 2024

Changes proposed:

  • Implemented spawn tracking (system that modifies state UFs and visibility of creatures and gos according to the completion of a quest objetive). Based on the examples found, I've added 3 spawntracking states for the quest objective:
    • None (no quest)
    • Active (active quest objective)
    • Complete (quest objective completed or quest rewarded)

Issues addressed:
Closes #29705

Tests performed:
Builds, tested in-game, Added example for quest https://www.wowhead.com/quest=55881/purge-the-totems (.quest add 55881)

Known issues and TODO list: (add/remove lines as needed)

  • Missing implementation for SPELL_ATTR8_ALLOW_TARGETS_HIDDEN_BY_SPAWN_TRACKING (I'll implement this in another PR after checking some cases)

@jackpoz
Copy link
Member

jackpoz commented Nov 29, 2024

sql/updates/world/master/2024_99_99_98_world.sql needs to be completely recreated. It drops and creates a table and then tries to delete rows from that table just dropped and created.

@Aokromes
Copy link
Member

src/server/game/Entities/Player/Player.cpp
src/server/game/Server/WorldSession.h

@jackpoz
Copy link
Member

jackpoz commented Nov 30, 2024

How many rows does

DELETE stqo
FROM `spawn_tracking_quest_objective` stqo
LEFT JOIN `quest_objectives` qo ON stqo.`QuestObjectiveId`=qo.`ID`
WHERE qo.`ID` IS NULL;

delete at the end of the sql update ? Are most of the rows excluded already before ?

@meji46
Copy link
Member Author

meji46 commented Nov 30, 2024

How many rows does

DELETE stqo
FROM `spawn_tracking_quest_objective` stqo
LEFT JOIN `quest_objectives` qo ON stqo.`QuestObjectiveId`=qo.`ID`
WHERE qo.`ID` IS NULL;

delete at the end of the sql update ? Are most of the rows excluded already before ?

  1. Possibly most of these objectives are linked to serverside quests

Copy link
Member

@mdX7 mdX7 left a comment

Choose a reason for hiding this comment

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

seems great already. Would be cool to get a command to get info about spawntracking for targeted npcs; but thats for a separate pr imo


if (unit->IsCreature())
if (SpawnTrackingStateData const* spawnTrackingStateData = unit->GetSpawnTrackingStateDataForPlayer(receiver))
stateAnimKitId = spawnTrackingStateData->StateAnimKitId.value_or(0);
Copy link
Member

Choose a reason for hiding this comment

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

intended to use 0 here instead of default stateAnimKitId?

@meji46 meji46 merged commit c9099c8 into TrinityCore:master Jan 4, 2025
7 checks passed
@meji46 meji46 deleted the spawn-tracking branch January 4, 2025 19:52
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.

Missing SpawnTrackingIDs

5 participants