Fix AdventureBot travel recovery, ranged spacing and companion revival
This commit is contained in:
1 parent
a62d6b299e
commit
676f566a8c
24 files changed
+1654
-62
No files matched your search
@@ -1,3 +1,620 @@
|
||||
# 2026-11-07 – Lokaler Commit des gesamten offenen Entwicklungsstands
|
||||
|
||||
Nutzer beauftragt Commit. Enthalten sind die bereits installierten und getesteten
|
||||
Flugdiagnosen/Flugkorrekturen, stündliche Reisebefreiung, Fernkampfabstand und
|
||||
Begleiterwiederbelebung samt Tests, Dokumentation und reproduzierbaren Testskripten.
|
||||
Branch feature/clientless-player-core. Kein Push. Build/Live-Ergebnisse und
|
||||
verbleibende Abnahmegrenzen stehen in den folgenden Checkpoints. Keine neue
|
||||
Codeänderung oder Serveraktion für diesen Commit.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-07 – Fernkampfabstand und Tierwiederbelebung fertig installiert
|
||||
|
||||
Nutzerauftrag beideKorrekturen umgesetzt, KEINCommit/Pushbeauftragt. VorigeWIP
|
||||
Flug/Stundenrettung/Chatdoku unverändertbewahrt. AdventureCombatMgrcpp/h neu:
|
||||
sharedMaintainPet imAdventureController vorInstanzführerWarten/Supply/Follow,
|
||||
HunterRevive982SELF (auchgespeicherttot),Call883SELF, bestehendesPet nichtdurch
|
||||
Wolfersetzen. Warlock/Unholy nativeSummons beibehalten. NativeKosten/Castzeiten/
|
||||
Cooldowns; keinePflegebeiTod/Mount/Flight/Taxi/Transport/Fallen/Teleport/Charm;
|
||||
laufenderPetcast hältBewegung; Fehlversuche3SekRetry. KeineKlassenohnePet zum
|
||||
Stillstandbringen (EligibilityGuard vorStopMoving).
|
||||
RangedCombatAttackRange: höchste bekannteRänge derRotation+Hunter75, native
|
||||
Min/Max+CombatReach+RangedWeaponMod+RangeSpellMod; keinekurzenUtility/AoESpells
|
||||
alsDistanzmaß. Bandziel70%, Rückzugunter35%, AnnäherungvorMaxRand, Hysterese;
|
||||
8MMAP/LOS-geprüfteRichtungen/2Sek. KeineCastunterbrechungfürDistanzänderung.
|
||||
BlockierterRückzuglässtAttackenlaufen; fehlendeLOS/Range20Sek->Finish wiebisher.
|
||||
Nahkampfregeln undproaktiveAggressionsfilter unverändert. COMBAT_REPOSITIONlog.
|
||||
|
||||
6TestsPASS: combat_spacing(Produktionshelper+nativeRangeadapter,ASan/UBSan),
|
||||
combat_reactions,combat_exercise,combat_preparation,class_rotation,rotation.
|
||||
TestSpacingprüftSelfRevive/StoredDead/CallFailureNoReplacement,Transport/Flight/
|
||||
Mount/Teleport/Casthold,RangeRanks+Utility,Retreat/Approach/Hysterese/Alternativen/
|
||||
Retry/Castguard/Unreachable. TesthüllenfehlerFireSpec0->1korrigiert,Testsgrün.
|
||||
BuildfinalPASSj10, Loaderconfig/runtime0+safeall zuBeginnbeiderinkrementellen
|
||||
Buildläufe; zweiterenthieltEligibilityGuard. ErstnacherfolgreichemBuildnormal
|
||||
shutdown10, integrierter60SekDrain/Finalize7Restbots->0, normalbeendet. Vollstopp
|
||||
+tmuxEnde vorInstall. cmakeinstallPASS. FreshboundedGDBstart PID54177, READY
|
||||
und8085/8087geprüft; Loaderconfig/runtime1restauriert, regulärePopulationläuft.
|
||||
Logs/Scripts/Ergebnisseuntercheckpoints/2026-11-07-combat-recovery.
|
||||
|
||||
LIVEPASS: velaanna-pet-revive-fixed-b: echteWolf299Owner133getötet, automatisch
|
||||
982self, nachnativerCastzeitwiederlebendig347/2315; danachTestcleanupvolle2315.
|
||||
velaanna-combat-fixed-b: Morvath150Horde temporär38/maxHP50000vsHunter133lvl38,
|
||||
reinerPvPAngriffbeiElwynnForest, echtesPetnachKampfabsteigengetötet(GUID/Owner/
|
||||
Health0geprüft), automatische982imKampf, danachPetgreiftwiederan. 60Samples,
|
||||
3ChecksPASS,43SamplesPetalive; Distanz9.925->31.605ydMittelpunktabstand durch
|
||||
normalesMMAPGehen, NativeBand5..43/Ziel31.6. 75/1978/53301/3044nativgecastet.
|
||||
VorigeDiagnoseblieb~10.55ydMittelpunkt/~7.55GetDistanceohneRetreat.
|
||||
ErsterReviveVersuchzuFrühnachLoginvorControllerloadhattekeinPet->keinvalider
|
||||
Spieltest; kontrolliertesSetupundWiederholungPASS. ErsterKampflaufbewiesSpacing,
|
||||
aberPetwaranfangsmountbedingtunsummonedundnichtgetötet->RevivecheckFAIL korrekter
|
||||
Harnessbefund. WiederholungwartetaufgeladenesPetvorKillundbestehtalleChecks.
|
||||
KeineProduktionsursacheausdiesenSetupFehlernbehaupten.
|
||||
Cleanup: Velaanna nachStormwind, schedule133on, PvPBytes256restauriert, Petlebendig
|
||||
volle2315; Morvath80/maxHP9531/map1Orgrimmar/PvPBytes285212672restauriert,Logout.
|
||||
Testrion10/maxHP231/GMoff, CleanupCheckPASS:HunterCombatrefs0,Observerstats231;
|
||||
zurückanVorherpositionmap0(2362.5,-1510.34,100.637),LogoutbeiderTestactorsDBgeprüft.
|
||||
PetimCleanupmountbedingtunsummoned; gespeicherteOriginalPetID30/2315HP/active1
|
||||
abschließendDBgeprüft, keineErsatzpetanlage.
|
||||
TemporärerReturnMarker codex_velaanna_return_20261107gelöscht(SELECTleer).
|
||||
KeinenNutzercharakterverändert. SeparaterLiveTestinSpielergruppe NICHTerfolgt;
|
||||
HookistgruppenunabhängigvorderFollow/InstanzwarteLogik. AndereFernkampfklassen
|
||||
Rangeadapterautomatisiert, nichtallelive. FinalevisuelleAbnahmedurchNutzer.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-07 – Kampffix in Arbeit, Build/Liveprüfung noch offen
|
||||
|
||||
Nutzer beauftragt Fernkampfabstand + Tierwiederbelebung. AdventureCombatMgr
|
||||
jetzt gemeinsamer MaintainPet-Hook im Controller vor Instanzführer-Warten,
|
||||
native Self-Casts982/883, gespeicherte tote Pets berücksichtigt, kein Ersatzwolf
|
||||
bei fehlgeschlagenem Laden bestehender Pets. Keine Pflege während Mount/Flug/
|
||||
Taxi/Transport/Teleport/Tod; laufender Petcast hält Folgen an. Alle Gruppenarten.
|
||||
RangedCombat nutzt Schnittmenge nativer bekannter offensiver Zauberreichweiten
|
||||
inkl CombatReach/RangeMods, Ziel70%Band, Auslöser35%/max-Sicherheitsrand,
|
||||
Hysterese, bis8MMAP-validierte Kandidaten/2Sek, kein Abbruch laufender Casts.
|
||||
Blockierter Rückzug lässt Angriffe zu; unerreichbare Ziele nach20Sek freigeben.
|
||||
Bestehende Aggressions-/Initiativfilter unverändert.
|
||||
Tests combat_spacing(ASan/UBSan),combat_reactions,rotation,class_rotation PASS.
|
||||
Build gestartet j10 mitLoader config/runtime0 undsafeall. ErsterBuild linkt;
|
||||
DANACH NOCHMAL inkrementell bauen: nach Start wurde nochEligibility-Guard
|
||||
angepasst, um erfolglose Petpflege bei Nicht-Pet-Klassen/stable-onlyPets nicht
|
||||
alle3Sek Bewegung stoppen zu lassen. KEIN Shutdown vor erfolgreichemfinalBuild.
|
||||
Danach normale Shutdown10/install/freshboundedGDBstart READY/Ports/Loader1.
|
||||
LiveWiederholung mitVelaanna133/Morvath150 noch NICHT erfolgt. KeineCommits.
|
||||
VorherigeWIP erhalten, Testactors aus vorigerDiagnose sauber zurückgesetzt.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Velaanna-Kampfdiagnose abgeschlossen, noch kein Kampffix
|
||||
|
||||
Nutzer batKämpfebeobachten undautorisierteausdrücklichaktiveTests/Hordeangriff,
|
||||
Intentwechsel/Teleport. NeueKampflogik NOCHNICHT implementiert. Vorigeoffene
|
||||
Flug-/Stundenrettungsänderungenunverändert. Serverläuft, Loader1.
|
||||
|
||||
BELEGT: Velaanna133DraeneiHunter38solo kennt883/982nativeLookup [known] trotz
|
||||
fehlenderDBcharacter_spellZeilen(defaultSpells!). HordeTestMorvath150Warrior80
|
||||
fürTest38, hoherTestHP9531, GMoff, temporärePvP-Unitbytes2Bit256 beide.
|
||||
velaanna-horde-combat-bPASS:24Samples12Sekunden, Hunterfokussiert150, Wolfgreiftan,
|
||||
Zauber75/1978/53301/3044, GetDistance~7.553 konstant, keinZurückweichen.
|
||||
OutcombatRestPettestPASS: HuntertemporärStormwind/GildedRose, echterWolf299
|
||||
Owner1332315HPgeprüft, .die,15Samples30SekundenalledeadohneCombat. Native
|
||||
.cast self982belebtkorrekt. Handler.modify hp2315wirktebeimPetaufGMstattPet;
|
||||
CleanupTestrionmaxHP231undPetHealthfeld26mitOwnerprüfungauf2315/2315hergestellt.
|
||||
HunterzurückexakteVorherpositionviaeindeutigemtemporäremGameTeleMarker,
|
||||
schedule133on, Marker inDBundCachegelöscht.
|
||||
CombatPettestPASS: nochmalHordeangriff, Wolfgetötet,40Samples20Sekundenalledead;
|
||||
keinAI982Cast. Danachnative.cast self982erfolgreich,Wolfvoll2315/2315.
|
||||
MorvathamEnde80/map1Orgrimmar/fullHP9531, ursprünglichePvPbytesrestauriert;
|
||||
HunterOriginalPvPbytes256unverändert, TagesplanDBunverändert, schedule1 profession.
|
||||
AlleTestläufeabgeschlossen, TestbotsLogout. KeineGruppeangelegt, keineNutzer-
|
||||
Charakteremodifiziert. ErsterHordeversuchscheiterteanhexGUIDtarget_state,
|
||||
sofortCleanup+MorvathrestorePASS, dannDezimalGUIDverwenden. DieseSkriptfehlernicht
|
||||
alsProduktionsfehlerberichten.
|
||||
|
||||
SOURCEURSACHEN: Fighter.Tick Cast(982,pet)verwendetfalschesZiel. Native
|
||||
SpellEffectResurrectPet arbeitetüberPlayercaster undseinPet; CanAutoCast des
|
||||
PlayerAI prüftobgewünschtesZieltatsächlichgetroffenwird. Selfspellmussanme,
|
||||
nichtdeadPet. OutcombatkeinePetmaintenance; betrifftauchSolo,nichtexklusivPlayergruppe.
|
||||
RangedAnlaufzielGetNearPoint0.5 wieMelee, inRangefix25+LOS, keinNahdistanz-
|
||||
Rückzug. Proactive nurSoloAdventurelaufendundnahPfad8yd/20Suchradius oder
|
||||
SoloProfessionSkinning; FactionNPCsseparatePvP-Bereitschaft, weitereSafeFilter:
|
||||
nichtElite/Boss,<=Level+2,HP>=60,Mana>=30,keineweiterenHostilenim12ydRadius.
|
||||
UnterAggro reagiertVelaannabeiNPC44551undHordeTestnormal; Passivitätvorallem
|
||||
bewusstengeInitiativefilter. GruppenfolgersollenkeinewillkürlichenPullsstarten.
|
||||
|
||||
Ergebnisse checkpoints/2026-11-06-combat-inspection/{before,result}.json;
|
||||
LiveLäufe server/debug/testbots/results/velaanna-{observe,range-observe,
|
||||
horde-combat-b,pet-rest-test,pet-test-cleanup,combat-pet-test}.json.
|
||||
NächsterSchrittbeiFixauftrag: eigenständigeKlassenpetpflege(Solo/Gruppe,Combat/
|
||||
Outcombat, nativeSelbstzauber), FernkampfZielabstandnachnativenZauberreichweiten
|
||||
inklMMAPgeprüftemRückzug; Aggressions-/Gefahrenverhaltenseparatabstimmen.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Kampf-/Begleiterdiagnose Velaanna133, aktive Tests autorisiert
|
||||
|
||||
Nutzer will Kampfverhalten prüfen (Petrevive, Fernkampfabstand, starkePassivität),
|
||||
erlaubt ausdrücklich aktiveTests mitHordeTestcharakter, Intentänderung/Teleport.
|
||||
Velaanna133 DraeneiJäger38 account15, keineGruppe, vorherSchedule1 profession
|
||||
poi_tele_206. TagesplanDB NICHT geändert. Vorherdaten unter
|
||||
checkpoints/2026-11-06-combat-inspection/before.json. Kein neuerCode/Build.
|
||||
Source: Petmaintenance nurFighter::Tick mitaktivemKampfziel, nichtallgemeinidle.
|
||||
RangedinRange fest25yd+LOS, Annäherungsziel aber0.5yd amFeind undkeinRückzug bei
|
||||
zu geringemAbstand. Proactive nurSoloAdventure laufendnahePfad oderSoloProfession
|
||||
Skinning, sehrengeSafeFirstAttack-Grenzen; normaleWirtschaft/andereBerufe keine
|
||||
Monsterinitiative. Das ist größtenteilsDesignrestriktion, keineBlindheitunterAggro.
|
||||
|
||||
LIVE HordeTest Morvath150 undeadWarrior ursprünglich80, fürTest38+HP9531,
|
||||
GMoff/PvPtemporärbeideUnitBytes2Bit256. Fraktionenunverändert; ursprünglicher
|
||||
HunterUnitBytes2=256, Morvath285212672. ErsterSkriptversuch scheiterte anhexGUID
|
||||
fürtarget_state (diesesAPI erwartetDEZIMAL!), danachMorvathvollständiglevel80/
|
||||
Orgrimmar/Flagsrestauriert (morvath-test-cleanupPASS). DanachverbesserterLauf
|
||||
velaanna-horde-combat-bPASS24Samples: VelaannawähltMorvath alsPvPZiel, nutztWolf
|
||||
undZauber75/1978/53301/3044, bleibt~7.553ydGetDistanceohneAbstandaufzubauen.
|
||||
BeidePetspells883/982 imNATIVENSpelllookupBEKANNT. DBcharacter_spell fehltesie,
|
||||
also NICHTfehlendeKenntnisbehaupten (Defaultspells könnenruntimebekanntsein).
|
||||
TestendeMorvathzurück80Orgrimmar,Flagsrestauriert.
|
||||
|
||||
LIVE RuhePettest velaanna-pet-rest-testPASS: temporärerGameTeleReturnmarker
|
||||
codex_velaanna_return_20261106, Velaannarestthe_gilded_rose+TeleportStormwind,
|
||||
OriginalWolf299Owner1332315HP mit.diegetötet.15Samplesüber30Sekundenallealivefalse
|
||||
undOwnernichtimKampf. Manuellesnative.cast self982belebtWolfwieder. Hunterzurück
|
||||
überMarker anexaktevorherigePosition, schedule133on, MarkerGELÖSCHT. Achtung:
|
||||
.modify hpbeiPetwirkteaufTestrionstattPet! NachfolgendeCleanup
|
||||
velaanna-pet-test-cleanupPASS: TestrionmaxHP231wiederhergestellt, Wolfmitkorrekt
|
||||
selektiertemOwner133überHealthfeld26auf2315/2315restauriert. KeineTestresteMarker.
|
||||
|
||||
JETZTläuft zusätzlicherLauf velaanna-combat-pet-test (Morvath150): wiederkurzer
|
||||
HordeAngriff, WolfimKampfgetötet,20SekundenAutorevivebeobachten, danachfallsnötig
|
||||
.cast self982+12Sek undPetHPvoll, eigeneFlags/Level80/Orgrimmarzurück. Scriptunter
|
||||
server/debug/testbots/scripts/velaanna-combat-pet-test.lua undResultgleichnamig.
|
||||
BeiAbbruchCleanupprüfen: 150muss80/map1(1569.97,-4397.41,16.0472)undnichtimKampf
|
||||
sein, Owner133normalSchedule1, WolflebendigHP2315. PetGUID überUnitFelder10low/
|
||||
11high, Lua string.format("%u",(high<<32)|low), nichthex. UnitField16Owner133
|
||||
prüfen;26Health;117Bytes2PvP. LaufendeScripts keinenCodeumbauzuschreiben.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Stündliche Reisebefreiung fertig installiert
|
||||
|
||||
Nutzerauftrag umgesetzt: erster echter Stundenwechsel zeichnet fehlgeschlagene/
|
||||
unvollendete Reise auf, nächster ohne neuen real erreichten Graphenknoten löst
|
||||
individuelle Kapitalrettung aus. Keine Neuplanung/wechselnde Ausweichziele/
|
||||
Wanderrunden alsFortschritt. BereitsbesuchteKnoten dedupliziert; Transit/Taxi/
|
||||
Flug/Fallen/Teleport zählen nichtalsabgeschlosseneKnoten. NeuePolicy
|
||||
AdventureHourlyTravelPolicy.h. Controllerhook vorGroupFollow/Transport/Combat-
|
||||
undBehaviorreturns, dadurch auchblocked alteIntent/Handover erfasst.
|
||||
|
||||
NormaleOnSite-Aktivitäten, Browserwarteplatz bereitsamKapitalziel undaktive
|
||||
Instanz/Raid/BG/Encounter ausgenommen. Kampf/Tod wartenaufnormalenController;
|
||||
Transport/Flug/Fallen/Cast maximal60zusätzlicheSekunden. VorEingriffValidierung
|
||||
vonFraktionshauptstadt/Level-/Gebietsregeln/Kapitalzone undBoden. NativeTeleport
|
||||
löstShip/Elevator/Vehicle; Taxi/Flight/Travel bereinigt. Gruppebleibterhalten,
|
||||
nurBetroffenerteleportiert; aktuellerTagesplan setztneu an. Watchruntime,
|
||||
LoginzähltNICHTalseinStundenwechsel. Statusüber clientless adventure status.
|
||||
Logs HOURLY_TRAVEL_CHECK, _RESCUE_DUE/WAIT/COMPLETE. Dokumentation
|
||||
doc/clientless/navigation-recovery.md ergänzt.
|
||||
|
||||
Build(-j10) undInstallationPASS. Loader config/runtime0+safeall vorBuild,
|
||||
normaler shutdown10 erstdanach, integrierte60SekFrist undnormalerProzessausstieg,
|
||||
tmuxEndeabgewartet. FreshboundedGDBstart PID39227 READY+8085/8087 geprüft;
|
||||
Loader config/runtime1 wiederhergestellt. KeinCode/DBResetvorherigerWIP.
|
||||
5TestdateienPASS: neuePolicy+extrahierteProduktionsrettung(ASan/UBSan),
|
||||
waiting_capital/recovery_policy/behavior_policy. Tests umfassenKreisbewegung,
|
||||
Knotenfortschritt, Handovers, protectedwaiting/Instanz, Kampf/Tod,60SekDeadline,
|
||||
Taxicleanup, KapitalprüfungvorCleanup undFraktionen. BehobenerTestliteralfehler
|
||||
betrafnurTesthülle, abschließendeTestsPASS.
|
||||
|
||||
LIVE: registrierteTestbots Testrion148 nachStormwind undMorvath150 nachOrgrimmar
|
||||
übernativeTeleportpunkte, korrekteKapitalzone undFloorje<0.001ydAbweichung,
|
||||
beideTestchecksPASS; TestendeLogout. Lillini104/Tholgar92 normalwiederangemeldet,
|
||||
StatuswatchcurrentHourarmed0pending0, keineManuellTeleportation. EchterVergleich
|
||||
überzweiStundenwechsel NOCHNICHTlivebeobachtet. NächsteGrenze17:00armtbeiweiterer
|
||||
Reise,18:00kannrettenbeiweiteremFehlenvonFortschritt; keinesofortigeRettungbeim
|
||||
Installationsstartbehaupten. Serverläuft. KeinCommit/Pushbeauftragt.
|
||||
Checkpoint2026-11-06-hourly-travel-rescue enthältLogs+result.json.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Stündliche Reisebefreiung implementiert, Build läuft
|
||||
|
||||
Nutzer autorisiert Kapitalrettung wenn zwei echte Stundenwechsel ohne weiteren
|
||||
Reisefortschritt. Neue AdventureHourlyTravelPolicy.h: ersteStundengrenze armt,
|
||||
nächste ohne weiteren real erreichten Graphenknoten wirdfällig. BesuchteKnoten
|
||||
dedupliziert (A-B-A-Schleifen erneuernFortschritt nicht unbegrenzt), neueZiele,
|
||||
Replans undFußersatzrunden sindkeinFortschritt. NativeTaxi/Schiff/Flug-Zwischen-
|
||||
positionen zählen nichtalsKnotenankunft. Kein eigenerReiseabschnittdarf1h benötigen.
|
||||
Public UpdateHourlyTravelRescue imAdventureController vorGroupObserve/Transit/
|
||||
Combat/altenIntentreturns. WartendeBots bereitsamKapitalziel, OnSite-Performances,
|
||||
aktiveDungeons/Raids/BG/Encounter ausgenommen. BlockierteScheduleHandovers erfasst.
|
||||
PendingCombat/Tod wartenaufnormalenController, Transit/Flug/Fallen/Casts maximal
|
||||
60Sekunden. VorCleanupPrüfung vonFraktionshauptstadt, Area/Level, echterKapitalzone
|
||||
undBoden. NativeTeleportTo löstPassagier/Vehicle, Taxi/Flight/Travel sauberabbrechen,
|
||||
keineGruppeauflösen oderandereMembers teleportieren. AktuellenTagesplan danach
|
||||
neu aufnehmen. Adventure status zeigtwatch armed/pending/progress/checkpoint.
|
||||
Zwei neueASan/UBSanTests policy+extrahierteProduktionsrettung PASS, bestehende
|
||||
waiting_capital/recovery_policy/behavior_policy PASS. Keine tatsächliche1hLive-
|
||||
Prüfung behaupten. Erster Testergänzung hattePythonliteralfehler, korrigiert.
|
||||
|
||||
Build jetzt -j10 (session wirdToolausgabe liefern), Logunter
|
||||
checkpoints/2026-11-06-hourly-travel-rescue/build.log. Loader config/runtime0,
|
||||
safe allangefordert. NormalshutdownerstnacherfolgreichemBuild. Danachvollständig
|
||||
stoppen/installieren/boundedGDBstart/READY+Portsprüfen/Loader1wiederherstellen.
|
||||
VorherigeuncommitteteFlugfixes undResumeWIPbeibehalten. KeinCommitbeauftragt.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Warum kein Befreiungsteleport greift
|
||||
|
||||
Nutzerfrage zuFallback geprüft. RecoverFollower setzt beiPositionsänderung>1yd
|
||||
RecoveryState vollständig zurück, bewertet also lokaleBewegung alsFortschritt.
|
||||
BeideRecoverywanderer bewegen sichlaufend, können daherStillstandfrist erneuern.
|
||||
Gruppenfallback ist nurFollow-to-Leader, kein unabhängigerRettungsteleport.
|
||||
AktuelleDBgroups: Lillini104 group8 leader104; Tholgar92 keineGruppe. Somit104
|
||||
alsLeader ausgeschlossen,92 ohneLeader ausgeschlossen, selbst bevorStillstandprüfung.
|
||||
HistorischerTholgarTeleport23:13:21 wurdebereitsausgeführt, brachte ihn nurzum
|
||||
problematischenLeaderbereich. AllgemeinerRescueNodeTeleport ist ausdrücklichaus
|
||||
ActionExecutor nurfürmap369 freigegeben, nichtbeliebig530. Fahrstuhlfallback
|
||||
hierebenfallsunzuständig. Lücke: zyklischeBewegungohneMakroreiseFortschrittwird
|
||||
nichtalsdauerhaftesFesthängenerkannt, keinallgemeinergeprüfterAuswegteleport.
|
||||
KeinCode/DB/RuntimeänderungfürdieseFrage.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Tatsächlicher Testbot-Fußweg zu Lillini/Tholgar geprüft
|
||||
|
||||
Nutzer bittet registrierten Testcharakter zuAllitester holen und zu beidenBots
|
||||
laufen lassen. Testrion148 per appear zuAllitester, GMmodeOFF, unmounted, keinFlug.
|
||||
Native testbot.move nutzt PathGenerator+MovePoint, KEIN Teleport für Laufstrecken.
|
||||
ErstePosition Allitester(-2107.7,5250.7,5.21): Move zu beidenBots vorStart abgelehnt.
|
||||
Nutzer bewegt sich inzwischen nach(-2052.397,5175.132,4.658); neuer nativer
|
||||
mmap path Vergleich zu beidenZielen ergibt vollständigeType1Wege inbeideRichtungen.
|
||||
Nur für diesen stationären Vergleich zweiterRegistrierter Testaria149 anZiel-
|
||||
Koordinaten gestellt, keinBewegungserfolg daraus behauptet. Beleg
|
||||
shattrath-wall-path-types.json.
|
||||
|
||||
Entscheidender tatsächlicher Lauf shattrath-wall-walk-c (Scriptwall-walk-b):
|
||||
Testrion vom neuenAllitesterpunkt zur aufgezeichnetenLilliniPosition, zuFuß zurück,
|
||||
zur aufgezeichnetenTholgarPosition, zuFuß zurück. Alle4Ankünfte echt <1ydZielabstand
|
||||
undPositionssamples500ms, statepassed checks4 failures0. Keine Teleportationen
|
||||
aufHin-/Rückstrecken; untersuchteBots bleiben unverändert und laufen selbstweiter.
|
||||
Ziele sind erfasste Botpositionen beiAbmarsch, keinClaimdynamischerVerfolgung.
|
||||
NachRückkehr15SekundenamStart gewartet, Testende fordertLogout. NativeBewegung
|
||||
bestätigt somit Erreichbarkeit der fraglichenMauerregion von neuerAußenposition.
|
||||
Beweis sichtbarerWanddurchquerung erfordert Clientbeobachtung. AsynchroneFrage
|
||||
"Siehst du Testrion durchHügelwand laufen?" gestellt, bisher keineAntwort.
|
||||
Nicht ohne diese visuelleBestätigung behaupten, dass konkreteWand durchquert wurde.
|
||||
Resultate unter server/debug/testbots/results/shattrath-wall-walk[-b|-c].json.
|
||||
Kein Source/SQL/Build/Neustart/Commit in dieser Aufgabe. Nur Resume aktualisiert.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Eintritt Lillini104 / Tholgar92 historisch rekonstruiert
|
||||
|
||||
Nutzer fragt wie beide in problematischen Shattrath-Bereich gekommen sind.
|
||||
Rotierte Navigationslogs enthalten entscheidende Historie bereitsGESTERN:
|
||||
2026-11-05 22:16:32 Lillini104 nach Flugabbruch Notlandung
|
||||
(-2132.312,5191.657,6.258), Recovery3/5; weiterer Abflugunverfügbar, Recovery4/5.
|
||||
Dann MMAP-Fußweg target(-2178.667,5250.399,4.658) type0x1 complete/suspicious0,
|
||||
134.76yd,35Punkte. NAV_EXEC seq547,589,644 führt über
|
||||
(-2104.494,5215.270,6.107),(-2135.573,5245.357,4.658) zum Ziel.
|
||||
22:16:45 NAV_COMPLETE. Ab22:16:45 weitere deferred-start-endpoint-replan-Wege
|
||||
zwischen(-2176.8,5248,4.658) und(-2188,5312,4.658) wie heute. Somit Eintritt in
|
||||
aktuelle problematische Ebene per akzeptiertem Bodenpfad nachNotlandung, keine
|
||||
heutige manuelle Versetzung und zeitlich vor heutigerFlughöhenänderung.
|
||||
Belegdatei adventurebot-navigation.log.2026-11-05_22-36-02.
|
||||
|
||||
Tholgar92 reiste später eigenständig überSturmwind/Dalaran/Darnassus. Letzter
|
||||
nachgewiesener Portaltransport23:08:20 map1Darnassus, dannRouteAccessDenied.
|
||||
23:13:21 GROUP_FOLLOW_RECOVERY guid92 leader104 botLeader1 map530 instance0
|
||||
blockedSeconds300 airborne0 distance100000 (mapübergreifenderSentinel), also
|
||||
Teleport nach5Min blockiertemFolgen zuAnführerinLillini. CodeAdventureGroupTravelMgr
|
||||
Zeilen300ff bestätigtTeleportTo Leaderziel. Belegdatei
|
||||
adventurebot-navigation.log.2026-11-05_23-35-15. DanachauchTholgar ständiggleiche
|
||||
Z4.658-Recoverywege. Gruppenfallback verbreiteteProblemposition ausLeaderbereich.
|
||||
Exakter erster Schnitt durch sichtbareHügelwand und Grund fehlerhafter Mesh-
|
||||
Freigabe noch NICHT bewiesen; keine pauschaleMMAP/LOS-Änderung vorgenommen.
|
||||
Nur Log-/Sourceprüfung. Keine Laufzeitzustandsänderung/Build/Neustart.
|
||||
NamensbestätigungvomNutzer: Lillini104, NICHT Lillina118.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Namensverwechslung Lillina118 / Lillini104 geklärt
|
||||
|
||||
Nutzer sieht Bot neben Allitester und Tholgar in Hügelwand, wundert sich über
|
||||
Auchindoun. WICHTIG: zwei verschiedene Charaktere! Lillina118 Level76 tatsächlich
|
||||
Auchindoun(-3362,5209,-101), Economy am Händler19879. Lillini104 Level75 steht
|
||||
mit Tholgar92 in Shattrath. Nutzer schrieb zuletzt lillinie. Alle früheren
|
||||
GPS/Flugdiagnosen für Lillina118 waren zu genau diesem Charakter, NICHT104.
|
||||
Aktueller Livevergleich geometry-live-comparison: Allitester21
|
||||
(-2165.884766,5275.690918,4.658489), Tholgar in Nähe, Lillina1198yd entfernt.
|
||||
DB bestätigt Lillini104 nahe Allitester. Asynchrone Frage nach exaktem Namen
|
||||
noch ohne Antwort, danach Fund zweier Namen bereits mitgeteilt.
|
||||
|
||||
Beide Shattrathbots laufen serverseitig wiederholte Recovery-Wege, stagnieren
|
||||
makroskopisch. Lillini104 instance-Intent wartet auf Gruppe/Browser, reist zur
|
||||
Hauptstadt poi_npc_68760; Tholgar92 groupformation Richtung poi_npc_307710.
|
||||
Flugfallback beider departure-unavailable/no reachable open takeoff point.
|
||||
Boden/MMAP-Pläne type0x1 complete, teilweise lange fast flache Z4.658-Läufe.
|
||||
GPS FloorZ4.658, aber höchste GroundZ teils37..57 (auch bei Allitester selbst
|
||||
51.764). NICHT daraus allein falsche Höhe/defekteMMAP folgern: höchste Fläche
|
||||
ist kein Beweis für richtige Spielerhöhe. Unterschied zwischen Clientgeometrie
|
||||
und geprüften Pfadflächen noch nicht abschließend geklärt.
|
||||
Native .debug los vom Testbot beiAllitester zuLillini VMAPblocked, MMAP-Weg59yd
|
||||
stattdirekt53 (kann legitimer Umweg sein); zuTholgar LoSclear und geraderMMAP42yd.
|
||||
Keine globale LOS-Pflicht für gültige MMAP-Wege als Fix behaupten!
|
||||
Nur registrierter Testrion148 für GPS/LoS/navtest benutzt, untersuchtBots und
|
||||
Allitester unverändert, Test abgeschlossen/Logout. Keine neue Source/DB-
|
||||
Änderung, Build oder Neustart für Untersuchung. Laufresultate unter
|
||||
server/debug/testbots/results/: lillina-tholgar-geometry,geometry-operator-gps,
|
||||
geometry-live-comparison,shattrath-lillini-tholgar,shattrath-wall-probe.json.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Fehlende Vorausblickhöhe: Fix fertig installiert
|
||||
|
||||
Nutzer autorisiert Änderung der Flugplanung. Next sammelt nur gültige nominale
|
||||
Vorausblickhöhen und verwendet deren Median; fehlende Proben brechen die Planung
|
||||
nicht mehr vor Kandidaten-/Vertikalsuche ab. Konkrete Korridore prüfen weiterhin
|
||||
alle realen Oberflächen und vollständige Körperstrahlen. Kein horizontales
|
||||
Durchfliegen unbekannter Flächen. Vollständige fünf Proben behalten altes Ergebnis.
|
||||
Diagnoselogik der vorigen Aufgabe bleibt erhalten. Docs entsprechend aktualisiert.
|
||||
Sieben relevante Testdateien PASS: Diagnose(ASan/UBSan), free_flight,
|
||||
vertical_escape, elevated_flight, takeoff_handoff, shared_landing, shared_rejoin.
|
||||
Loch voraus mit freier Säule startet geprüft vertikal; blockierte Säule/niedrige
|
||||
Decke bleiben gesperrt, horizontaler Lochkorridor wird verworfen.
|
||||
|
||||
Build -j10 PASS, Konfiguration+Runtime Loader0 und safeall vorher, kein früher
|
||||
Shutdown. Danach normal shutdown10 mit integrierter60SekFrist und regulärem
|
||||
Prozessende, tmux-Ende abgewartet, CMakeinstall PASS. Frischer bounded-GDB-Start
|
||||
PID23584 READY+8085/8087 geprüft. Loader config/runtime1 wiederhergestellt.
|
||||
Lillina118 normal login, keine Änderung ihres Plans/Intents und kein Teleport.
|
||||
Sie läuft nach Neustart normal und hat Economy-Ziel poi_tele_61 erreicht;
|
||||
14:32 economy_vendor_visit bei NPC19879, keine neue natürliche Abflugprobe im
|
||||
Beobachtungsfenster. Daher Produktionsgeometrie-Tests PASS, Live-Abflug von
|
||||
Lillina nach Fix noch NICHT bestätigt. Server läuft, keinCommit/Push beauftragt.
|
||||
Checkpoint2026-11-06-missing-height-flight mit build/install/startup.log und
|
||||
result.json. Offene WIP aus vorigen Aufgaben vollständig beibehalten.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Fehlende Vorausblickhöhe: Fix in Umsetzung
|
||||
|
||||
Nutzer autorisiert jetzt Änderung der Flugplanung. Next sammelt gültige nominale
|
||||
Vorausblickhöhen (Median), fehlende Proben beenden die Planung nicht mehr.
|
||||
Jeder konkrete diagonale/seitliche/vertikale Korridor wird unverändert gegen
|
||||
reale Oberflächen und Körperstrahlen geprüft; unbekannte Stellen bleiben gesperrt.
|
||||
Bei vollständig vorhandenem Vorausblick identische Medianberechnung wie zuvor.
|
||||
Regression deckt Loch voraus + gültigen senkrechten Start, blockierte Säule,
|
||||
fehlende Flächen entlang horizontaler Kandidaten und zu niedrige Decke ab.
|
||||
Vier relevante Testdateien PASS (Diagnose, free_flight, vertical_escape, elevated).
|
||||
Build PASS (-j10), Installation PASS, Checkpoint2026-11-06-missing-height-flight/build.log.
|
||||
Loader config/runtime0, safeall angefordert, keinShutdownbeiBuildbeginn.
|
||||
Nach Build normal shutdown10, komplett beenden, CMakeinstall, bounded-GDB-
|
||||
Neustart mit Ready/Portprüfung, Loader1 wiederherstellen und Lillina118 normal
|
||||
login für Live-Reproduktion. Fix installiert, regulärer Shutdown endete normal, frischer bounded-GDB-Start
|
||||
PID23584 READY+8085/8087 geprüft, Loader1 wiederhergestellt, Lillina118 normal
|
||||
login. Jetzt natürliche Abflugprobe abwarten (session76284). KeinCommit.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Flugkorridor-Diagnose fertig installiert und live bestätigt
|
||||
|
||||
Nutzer autorisierte bessere Ablehnungsdiagnose, KEINE Änderung der Flugregeln.
|
||||
ClientlessFlightPath.h optionale Diagnostics für konkrete origin/surface/floor/
|
||||
ceiling/ray-Ablehnung, Koordinaten/Oberflächen/Margin/Index und rayEndpunkte,
|
||||
vertikalen Versuch separat, frühe Ziel-/Vorausblickfehler. Next-Resultat bleibt
|
||||
unverändert. FlightMgr loggt FLIGHT_CORRIDOR_REJECT+DETAIL bei ungültigem Next.
|
||||
Dokumentation in testbots.md. Acht gezielte Flugtestdateien PASS, neuer Test mit
|
||||
ASan/UBSan; nach frühem Livebefund zusätzlich lookahead-Lochfall getestet und
|
||||
free_flight/vertical_escape erneutPASS. Zwei -j10-Builds/Installationen PASS.
|
||||
Erster Livebefund enthieltnone wegen bisher uninstrumentiertem Vorausblick;
|
||||
korrigiert im zweiten Build. Beide Male Loader config/runtime0+safeall vor Build,
|
||||
erst nach Build normal shutdown10, integrierte60SekFrist, reguläres Prozessende.
|
||||
Letzte Installation bei gestopptem Worldserver. GDB/tmux-Restschale endete kurz
|
||||
nach Prozess; anfänglicher tmux-Abwesenheitsassert traf diese Übergangsphase,
|
||||
kein laufendes Binary überschrieben. Frischer finaler Start PID20103, READY und
|
||||
8085/8087 geprüft, Loader config/runtime1 wiederhergestellt. Lillina118 normal
|
||||
login, kein Teleport/Intentwechsel an ihr. Server online. Kein Commit/Push.
|
||||
|
||||
ENTSCHEIDENDER LIVEBEFUND 14:00:04: departure1 verticalAttempted0, SurfaceReject1,
|
||||
Grund lookahead-surface-invalid. Abflug(-3235.950,5003.595,-103.866), Ziel
|
||||
(-3106.880,4946.710,-22.535); Vorausblickpunkt75yd index3
|
||||
(-3167.320,4973.348) liefert ground=-100000 terrainFloor=inf ceiling600.
|
||||
14:00:08 gleicherFehler am nächsten Abflugpunkt, index4. Keine Kollisionsstrahl-
|
||||
oder Bodenabstandsablehnung, Vertikalfallback überhaupt nicht erreicht.
|
||||
Separater registrierter Testrion148 reproduziert exakt gültige Abflugfläche,
|
||||
aber ungültige Bodenwerte75/100yd voraus. Test fertig/Logout, keine Geometrie-
|
||||
Dateien verändert. Gezielter nächster Fix: ungültige Vorausblickprobe darf nicht
|
||||
vor geprüfter vertikaler/lokaler Alternativsuche abbrechen; ohne Bodeninformation
|
||||
aber nicht blind horizontal durch unbekanntes Gelände fliegen. Noch NICHT umgesetzt.
|
||||
Checkpoint2026-11-06-flight-rejection mit Logs/result.json; Laufresultat
|
||||
server/debug/testbots/results/lillina-lookahead-probe.json.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Diagnose zweiter Build wegen frühem Vorausblickabbruch
|
||||
|
||||
Erste Diagnoserevision installiert, normaler Shutdown/Start READY+8085/8087
|
||||
geprüft, Loader1 wiederhergestellt und Lillina118 normal eingeloggt. Live:
|
||||
FLIGHT_CORRIDOR_REJECT departure1 verticalAttempted0 alleZähler0 Lastnone.
|
||||
Einziger bisher uninstrumentierter Return in Next: ungültige Höhenprobe der
|
||||
fünf Vorausblickpunkte (vor Kandidaten/Vertikalfallback). Ergänzt um
|
||||
lookahead-surface-invalid mit Koordinaten, Oberfläche und Index; gezielter Test
|
||||
mit Loch bei25yd bestätigt frühen Abbruch ohne vertikalen Versuch. Keine
|
||||
Navigationsregeln geändert. Zweiter Build PASS (-j10); zweiter normaler Shutdown läuft session42235,
|
||||
checkpoints/2026-11-06-flight-rejection/build-final.log. Loader wieder config0
|
||||
und runtime0, safe all angefordert; NICHT bereits heruntergefahren. Nach Build
|
||||
regulärer shutdown10, warten, install, boundedGDB-Neustart, READY+Ports,
|
||||
Loader1 wiederherstellen, Lillina118 normal login und Logbefund nachholen.
|
||||
Erste Build-/Install-/Startlogs im gleichen Checkpoint. Noch kein Commit. Zweite Installation/Start und finaler Livebefund stehen noch aus.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Flugkorridor-Ablehnungsdiagnose in Umsetzung
|
||||
|
||||
Nutzer autorisiert Diagnosecode für Lillinas Abflug. ClientlessFlightPath.h:
|
||||
optionale bounded Diagnostics mit unverändertem Prüfverhalten, Ablehnungszahlen
|
||||
und letzter konkreter Ursache, Position/Oberfläche/Margin/Index bzw.Rayendpunkten.
|
||||
Next markiert vertikalen Versuch separat inkl.Corridorursache oder rise-limited;
|
||||
frühe origin/goal/goal-height-Abbrüche sichtbar. ClientlessFlightMgr protokolliert
|
||||
FLIGHT_CORRIDOR_REJECT +DETAIL last/vertical nur bei ungültigem Next, vor Retry.
|
||||
Keine Flugtoleranz oder Navigationsregel verändert. Neuer Diagnoseregressionstest
|
||||
und7bestehende Flugtests bestanden. Build läuft session22825, Log unter
|
||||
checkpoints/2026-11-06-flight-rejection/build.log. Konfiguration und Runtime-
|
||||
Loader0, safe all angefordert (110Sessions), kein Shutdown bei Buildbeginn.
|
||||
Nach erfolgreichem Build normal shutdown10, Prozess vollständig beenden lassen,
|
||||
installieren, bounded-GDB-Start mit frischemLog+Ready/Ports prüfen, Loader1
|
||||
wiederherstellen. Danach Lillinas nächsten nativen Abflug auf Details prüfen.
|
||||
Noch NICHT installiert/restarted. Bekannter Resume-WIP bleibt erhalten.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Lillina auf richtiger Höhe, Abflugdiagnose
|
||||
|
||||
Nutzer hat Lillina selbst auf tatsächlichen Boden geholt; konnte normal laufen,
|
||||
aber Abflug scheitert. Frühere MMAP-Defektbehauptung relativieren: fehlendes Poly
|
||||
an Z-43 bei gleichemXY wie echter BodenZ-99 beweist keinen defekten begehbaren
|
||||
Boden. Alter GPS-Vergleich gps-allitester-lillina zeigt AllitesterZ-99.790596,
|
||||
LillinaZ-43.159523, differenz56.63. Nutzer korrigierte Höhe danach.
|
||||
Aktuelle Logs belegen echte vollständige normale MMAP-Laufsegmente type0x1,
|
||||
zuletzt von(-3198.523,5002.021,-101.397) über mehrere Segmente nach
|
||||
(-3086.510,4942.430,-101.047). Gebiet erlaubt. FlightMounts/Riding225/lizenzen
|
||||
vorhanden, FLIGHT_START nachDepartureWalk erfolgreiches Aufsatteln. Aber0Segmente
|
||||
und FLIGHT_DEPARTURE_RETRY1..3 jeweils8yd versetzt; wiederholt no safe bounded
|
||||
flight corridor, Notlandung am Start, Recovery zurück zu Graphenanker. Somit
|
||||
aktueller Fehler beim ersten Flugkorridor, keine generelle MMAP-Sperre.
|
||||
Testbot148+149 temporär GM on:30native .debug los Vertikaltests an zwei echten
|
||||
fehlgeschlagenen Abflugpunkten(-3221.053,4993.753,-101.356) und
|
||||
(-3198.523,5002.021,-101.397), Mitte+4radiale2yd, Höhen20/35/60.
|
||||
20/35 alle VMAP/GObj clear;60 ersterStandort alleclear, zweiter VMAPobstructed.
|
||||
Resultat server/debug/testbots/results/lillina-takeoff-rays.json. Diese nativen
|
||||
Augenhöhen-LoS prüfen NICHT exakt alle Flugkörperstrahlen0.8/4.5 und nicht die
|
||||
Oberflächen-Untergrenzen von Corridor/GetObjectHitPos. Einzelne konkrete
|
||||
Ablehnungsbedingung derzeit nicht inLogs; nicht als bewiesen benennen.
|
||||
Kein Code/DB/MMAP-Fix oder Build/Neustart. Testbots fertig/Logout angefordert.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Auchindoun-MMAP-Ebene mit Testbot bestätigt
|
||||
|
||||
Nutzer autorisiert Testbotprüfung der Ebene und nennt Allitester als offenen
|
||||
Ausgang. Nur registrierter Testrion148 benutzt, keine Änderung an Lillina118
|
||||
oder Allitester21. Keine MMAP-Dateien/DB/Source geändert, kein Build/Neustart.
|
||||
Live Allitester stand bei(-3172.447754,4944.548828,-101.394463), offen area3893;
|
||||
Lillina weiter(-3100.262451,4941.444824,-43.159523), also58.23yd höher.
|
||||
Direkte native Detourprüfung `.mmap loc` am Ausgang gültiges Polygon, bei
|
||||
Lillina ungültig. Beide in Kachel5303722.mmtile, Detourtile[38,07].
|
||||
Zweiter Test17Punkte auf Lillinas Z in Radien4/8/16/32, GPS zeigt insbesondere
|
||||
in4yd und west/südlicher Umgebung realen FloorZ ca-42..-45, aber kein Polygon.
|
||||
Auch Pfad von Lillina zu exakt eigener Position type0xC4, springt22.6yd hoch.
|
||||
Kontrolltest gleiche XY wie Lillina, obere FlächeZ=-20.560303: Polygon gültig,
|
||||
GPS area3956 Shadow Stair/outdoors. Damit Tile geladen und obere Fläche korrekt
|
||||
abgebildet, untere echte Kollisionsfläche nicht durch nahe begehbare Polygone
|
||||
abgedeckt. Ursachenbehebung am Extraktor/Generator bzw.Meshdaten untersuchen;
|
||||
kein bloßes Toleranzproblem. Kein tatsächlicher Fußweg als erfolgreich behaupten.
|
||||
Zwischenpunkte einer geraden3D-Linie zu Allitester waren nur Abtastungen,
|
||||
kein Nachweis einer begehbaren Verbindung; Höhendifferenz wichtig.
|
||||
Livebelege in server/debug/testbots/results/: auchindoun-exit-mmap.json,
|
||||
lillina-floor-grid.json,lillina-upper-control.json. Tests beendet/Logout.
|
||||
Native mmap loc gibt bei Erfolg irrtümlich false zurück und druckt Syntax;
|
||||
Polygonbefund anhand Dt[38,07] bewertet, separater Befehlsfehler nicht korrigiert.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Lillina118: MMAP-Einstieg in Auchindoun fehlerhaft
|
||||
|
||||
Nutzer bittet Prüfung, kein Fix/Build beauftragt. Level76, economy, map530
|
||||
(-3100.262451,4941.444824,-43.159523), Terokkar3519/Auchindoun3688, instance0.
|
||||
Kein Kampf, indoors. GPS FloorZ=-43.159523 bestätigt echten Boden, GroundZ
|
||||
höchste Fläche=-20.560303. Gebiet erlaubt, bekanntes Erblevel62..65,
|
||||
PreferFlight1. Flug lizenz/riding225 vorhanden, aber kein erreichbarer offener
|
||||
Abflugpunkt: departure-unavailable: no reachable open takeoff point. Wiederholte
|
||||
Planung mit flight_departure=aktueller Position, dann Abflugfehler, Recovery
|
||||
findet weder Grapheneinstieg noch Wanderweg, Intent rollt weitere economy-Ziele.
|
||||
Flightstatus letzter Versuch Failed safely landed after abort no safe bounded
|
||||
flight corridor; kein aktueller Flug. Keine Änderung an Lillina vorgenommen.
|
||||
Registrierter Testrion148 GM on / appear Lillina, Auswahl GPS/debug combat,
|
||||
acht lesende navtest-Proben um10/35yd auf gleicher Höhe. Alle type0xC4:
|
||||
INCOMPLETE|FARFROMPOLY_START|FARFROMPOLY_END, maxZDelta21..23, Startstandort
|
||||
wird also nicht mit brauchbarem MMAP-Polygon verbunden. Höhe der oberen Fläche
|
||||
passt zur Differenz, Hinweis auf fehlende/nicht angebundene untere MMAP-Ebene;
|
||||
konkrete Meshursache nicht abschließend bewiesen. Abflug-Fußfallback existiert
|
||||
und scheitert an Pfadprüfung; kein Beleg, dass er nicht aufgerufen wird.
|
||||
Testresultat server/debug/testbots/results/lillina-probe.json. Test fertig,
|
||||
Testbot Logout angefordert. Katalog unverändert, kein Code/Build/Neustart.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Schwarzfels-Levelbereich korrigiert, Bots bewegen sich wieder
|
||||
|
||||
Nutzer bestimmt Levelbereich der Sengenden Schlucht. Deren Katalogzeile51 hat
|
||||
min47/max51. Migration sql/custom/world/2026_11_06_01_blackrock_mountain_level_band.sql
|
||||
kopiert ausschließlich diese Felder nach area25, bereits auf Test-World-DB
|
||||
angewandt. Kein Umhängen der Gebietsabstammung und keine pauschale Freigabe.
|
||||
clientless adventure reload erfolgreich, Katalogrevision2; area53/96 beide
|
||||
KnownLevel1 min47 max51 allowed1. Kein Build oder Serverneustart erforderlich.
|
||||
LIVE ohne Teleport der betroffenen Bots: Noranda plant Route und läuft von
|
||||
(-7588.820,-1114.680,250.207) nach (-7616.694,-1116.898,256.985), Travel state
|
||||
Moving noProgressMs0 Richtung (-7488,-1166.4,276.195). Darden ebenfalls bereits
|
||||
(-7610.087,-1121.126,250.209), übernimmt Gruppenreise (waiting leader route).
|
||||
Damit Katalogblockade behoben und tatsächliche Positionsänderung beider belegt;
|
||||
weitere Reise bis zum Economy-Ziel nicht überwacht. Kein Commit beauftragt.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Noranda53 / Darden96: Schwarzfels-Kataloglücke diagnostiziert
|
||||
|
||||
Nutzer bat um Prüfung, keine Änderung beauftragt. Beide an identischer Position
|
||||
map0(-7588.819824,-1114.680054,250.207001), zone/area25 Schwarzfels, instance0.
|
||||
Noranda81 führt Gruppe, Darden82 wartet auf ihre Route; beide Intent economy.
|
||||
Über Beobachtungszeit unverändert. Kein Kampf; GPS FloorZ250.20668 passt zur
|
||||
Position. Flight enabled/riding225/license vorhanden, aber outdoors0.
|
||||
Area-Diagnose für beide: area25 factions3 min0 max0 KnownLevel0 allowed0.
|
||||
DB-Katalog25: min_level/max_level NULL, parent0. AdventureAreaPolicy::Allows
|
||||
lehnt auf Kontinentmaps unbekannten Levelbereich für Level<85 ab. AnalyzePath
|
||||
prüft jeden Pfadpunkt einschließlich Start, daher auch vollständige MMAP-Wege
|
||||
(type0x1) area-catalog-denied. Noranda rollt fortlaufend andere economy-Ziele,
|
||||
Darden wartet auf leader route; kein sinnvoller Fortgang.
|
||||
Registrierter Testrion148 temporär GM on, appear Noranda, GPS/debug combat auf
|
||||
beide und acht nur lesende navtest-Proben von Nachbarpunkten. Kein Versetzen/
|
||||
Planwechsel der untersuchten Bots. Test beendet/Logout angefordert. Ergebnisse:
|
||||
server/debug/testbots/results/noranda-darden-probe.json. Acht navtest-Proben
|
||||
alle area-catalog-denied, mindestens zwei vorher type0x1 mit mehreren Punkten.
|
||||
Kein Source-/DB-Fix, Build, Neustart oder Commit vorgenommen. Richtige nächste
|
||||
Korrektur: belastbaren Levelbereich für Transitgebiet Schwarzfels hinterlegen;
|
||||
Gebietsregeln nicht pauschal umgehen. Allgemeines Entkommen aus unzulässigem
|
||||
Startgebiet wäre getrennt zu betrachten.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Testbot-Operator live geprüft, Überwachung beendet
|
||||
|
||||
Nutzer beauftragte Start und Liveprüfung eines Testbots in Sturmwind mit
|
||||
Abschlussflüstern an Allitester und Warten auf /AI. Server unter bestehendem
|
||||
bounded-GDB-Launcher gestartet (Skript via bash; direkt fehlte Ausführungsrecht).
|
||||
Frische READY-Zeile, Prozess10293 und Ports8085/8087 geprüft. Loader1 unverändert.
|
||||
Testrion148 und Testaria149 zur Goldenen Rose teleportiert. Acht Prüfungen ohne
|
||||
Fehlschlag: GM-Sitzung, NPC6740-Auswahl, Debug combat auf NPC, Bot-/Selbstauswahl,
|
||||
server info, Chat und /AI-Provenienz. Erster Testlauf scheiterte nur an verbotenem
|
||||
pcall im Testskript; ohne pcall erneut vollständig durchgeführt. Resultat:
|
||||
server/debug/testbots/results/operator-live-20261106b.json. Abschlussflüstern
|
||||
an Allitester gesendet und vom Nutzer bestätigt. Authentifizierte /AI-Antwort
|
||||
von GUID21/Konto1: "gut danke, beende jetzt die Überwachung." Überwachung beendet;
|
||||
Testskript quittiert Antwort und beendet sich mit Logout seiner Testbots.
|
||||
Worldserver bleibt an. Kein neuer Code, Build oder Commit.
|
||||
|
||||
Offener Diagnosebefund: generischer BuildChatPacket-Monitor sieht bei normalen
|
||||
Flüstern die paketbezogenen GUIDs, nicht zwingend den tatsächlichen Empfänger:
|
||||
Player::Whisper benutzt this/this und für WHISPER_INFORM target/target. Zustellung
|
||||
und Absender echter /AI-Nachricht funktionieren, Empfänger-/Echo-Provenienz im
|
||||
Chatlog sollte separat am nativen Whisper-Kontext korrigiert werden. Noch kein
|
||||
Fix vorgenommen; wegen Stopwunsch keine weitere Überwachung/Untersuchung.
|
||||
|
||||
---
|
||||
|
||||
# 2026-11-06 – Testbot-Operator und Chatmonitor zum lokalen Commit abgeschlossen
|
||||
|
||||
Nutzer hat den Commit der letzten Vcore-Änderungen auf
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.log
|
||||
@@ -0,0 +1 @@
|
||||
*.log
|
||||
@@ -0,0 +1 @@
|
||||
*.log
|
||||
@@ -0,0 +1 @@
|
||||
*.log
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
local bot=testbot.login(148)
|
||||
testbot.command(bot,".gm on")
|
||||
testbot.command(bot,".appear Velaanna")
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"appear")
|
||||
local function field(index)
|
||||
local r=testbot.command(bot,".debug getvalue "..index)
|
||||
return tonumber(r.output[1]:match("(%d+)%s*$")) or 0
|
||||
end
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.record("hunter",testbot.command(bot,".gps"))
|
||||
testbot.record("hunter-status",testbot.command(bot,".clientless adventure status 133"))
|
||||
testbot.record("hunter-combat",testbot.command(bot,".debug combat"))
|
||||
local low,high=field(10),field(11)
|
||||
if low~=0 or high~=0 then
|
||||
local pet=string.format("%u",(high<<32)|low)
|
||||
testbot.select(bot,pet)
|
||||
local state=testbot.target_state(bot,pet)
|
||||
testbot.record("pet",state)
|
||||
testbot.check(field(16)==133 and state and state.alive,"original owned companion remains alive after tests")
|
||||
end
|
||||
testbot.record("testbot",testbot.state(bot))
|
||||
testbot.check(testbot.state(bot).max_health==231,"observer stats unchanged")
|
||||
testbot.command(bot,".gm off")
|
||||
testbot.teleport(bot,0,2362.5,-1510.34,100.637,0)
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"return observer")
|
||||
@@ -0,0 +1,116 @@
|
||||
local bot=testbot.login(150)
|
||||
local original=testbot.state(bot)
|
||||
testbot.record("morvath-before",original)
|
||||
testbot.command(bot,".gm on")
|
||||
-- Isolated, ground-based fight away from capital guards. Teleports are test
|
||||
-- setup only; all combat spacing is real walking through MMAP navigation.
|
||||
testbot.command(bot,".clientless adventure intent 133 rest the_gilded_rose 180")
|
||||
assert(testbot.command(bot,".tele name Velaanna ElwynnForest").success)
|
||||
testbot.wait(4000)
|
||||
testbot.level(bot,38)
|
||||
testbot.stats(bot,50000,original.max_power)
|
||||
testbot.command(bot,".gm on")
|
||||
assert(testbot.command(bot,".appear Velaanna").success)
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"appear")
|
||||
local function field(index)
|
||||
local r=testbot.command(bot,".debug getvalue "..index)
|
||||
return tonumber(r.output[1]:match("(%d+)%s*$")) or 0
|
||||
end
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.record("native-revive-spell",testbot.command(bot,".lookup spell Revive Pet"))
|
||||
testbot.record("native-call-spell",testbot.command(bot,".lookup spell Call Pet"))
|
||||
local hunterFlags=field(117)
|
||||
testbot.command(bot,".gm off")
|
||||
testbot.select(bot,"self")
|
||||
local ownFlags=field(117)
|
||||
testbot.record("pvp-before",{hunter=hunterFlags,testbot=ownFlags})
|
||||
testbot.wait(0)
|
||||
testbot.command(bot,".debug setvalue 117 "..(ownFlags|256))
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.command(bot,".debug setvalue 117 "..(hunterFlags|256))
|
||||
testbot.record("attack",testbot.attack(bot,testbot.player(bot,"Velaanna")))
|
||||
testbot.wait(400)
|
||||
testbot.stop(bot)
|
||||
testbot.select(bot,"Velaanna")
|
||||
-- One point from the opposing player guarantees a harmless defence trigger.
|
||||
testbot.record("damage",testbot.command(bot,".damage 1"))
|
||||
testbot.select(bot,"Velaanna")
|
||||
-- A mounted hunter may only restore its temporarily unsummoned pet after
|
||||
-- combat dismount. Wait for that real companion before killing it.
|
||||
local petLow,petHigh=0,0
|
||||
for i=1,20 do
|
||||
testbot.select(bot,"Velaanna")
|
||||
petLow,petHigh=field(10),field(11)
|
||||
if petLow~=0 or petHigh~=0 then break end
|
||||
testbot.wait(500)
|
||||
end
|
||||
local killed=false
|
||||
if petLow~=0 or petHigh~=0 then
|
||||
local guid=string.format("%u",(petHigh<<32)|petLow)
|
||||
testbot.select(bot,guid)
|
||||
if field(16)==133 then
|
||||
local death=testbot.command(bot,".die")
|
||||
local state=testbot.target_state(bot,guid)
|
||||
killed=death.success and state and not state.alive
|
||||
testbot.record("kill-pet-in-combat",{result=death,state=state})
|
||||
end
|
||||
end
|
||||
local automaticallyRevived=false
|
||||
local firstDistance=nil
|
||||
local farthest=0
|
||||
for i=1,60 do
|
||||
testbot.wait(500)
|
||||
local hunter=testbot.target_state(bot,testbot.player(bot,"Velaanna"))
|
||||
local me=testbot.state(bot)
|
||||
testbot.select(bot,"Velaanna")
|
||||
local pl,ph=field(10),field(11)
|
||||
local pet=nil
|
||||
if pl~=0 or ph~=0 then pet=testbot.target_state(bot,string.format("%u",(ph << 32) | pl))end
|
||||
if hunter then
|
||||
local d=math.sqrt((hunter.x-me.x)^2+(hunter.y-me.y)^2+(hunter.z-me.z)^2)
|
||||
if not firstDistance then firstDistance=d end
|
||||
if d>farthest then farthest=d end
|
||||
end
|
||||
if pet and pet.alive then automaticallyRevived=true end
|
||||
testbot.record("combat-sample",{hunter=hunter,testbot=me,pet=pet,combat=testbot.command(bot,".debug combat"),target_low=field(20),target_high=field(21)})
|
||||
if not hunter or hunter.health<hunter.max_health/2 or me.health<me.max_health/3 then break end
|
||||
end
|
||||
testbot.check(killed,"real owned pet was killed for the test")
|
||||
testbot.check(killed and automaticallyRevived,"automatic native in-combat pet revival")
|
||||
testbot.check(firstDistance and farthest>firstDistance+5,"ranged bot increases distance from stationary attacker")
|
||||
testbot.record("spacing-summary",{first=firstDistance,farthest=farthest,petRevived=automaticallyRevived})
|
||||
testbot.stop(bot)
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.command(bot,".debug setvalue 117 "..hunterFlags)
|
||||
testbot.command(bot,".combatstop Velaanna")
|
||||
local pl,ph=field(10),field(11)
|
||||
if pl~=0 or ph~=0 then
|
||||
local guid=string.format("%u",(ph<<32)|pl)
|
||||
local pet=testbot.target_state(bot,guid)
|
||||
testbot.record("pet-after-automatic-window",pet)
|
||||
if pet and not pet.alive then
|
||||
testbot.record("restore-pet-native",testbot.command(bot,".cast self 982"))
|
||||
testbot.wait(12000)
|
||||
end
|
||||
testbot.select(bot,"Velaanna")
|
||||
pl,ph=field(10),field(11)
|
||||
if pl~=0 or ph~=0 then
|
||||
guid=string.format("%u",(ph<<32)|pl)
|
||||
pet=testbot.target_state(bot,guid)
|
||||
if pet and pet.alive then
|
||||
testbot.select(bot,guid)
|
||||
if field(16)==133 then testbot.command(bot,".debug setvalue 26 "..pet.max_health)end
|
||||
end
|
||||
testbot.record("pet-restored",testbot.target_state(bot,guid))
|
||||
end
|
||||
end
|
||||
testbot.select(bot,"self")
|
||||
testbot.command(bot,".debug setvalue 117 "..ownFlags)
|
||||
testbot.command(bot,".combatstop")
|
||||
assert(testbot.teleport(bot,original.map,original.x,original.y,original.z,0.543025))
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"return")
|
||||
testbot.level(bot,original.level)
|
||||
testbot.stats(bot,original.max_health,original.max_power)
|
||||
testbot.record("morvath-after",testbot.state(bot))
|
||||
testbot.command(bot,".tele name Velaanna Stormwind")
|
||||
testbot.command(bot,".clientless adventure schedule 133 on")
|
||||
@@ -0,0 +1,73 @@
|
||||
local bot=testbot.login(148)
|
||||
testbot.command(bot,".gm on")
|
||||
assert(testbot.command(bot,".appear Velaanna").success)
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"appear")
|
||||
testbot.select(bot,"Velaanna")
|
||||
local original=testbot.target_state(bot,testbot.player(bot,"Velaanna"))
|
||||
local gps=testbot.command(bot,".gps")
|
||||
local orientation=tonumber(gps.output[2]:match("Orientation:%s*([%d%.%-]+)")) or 0
|
||||
testbot.record("before",{position=original,gps=gps,status=testbot.command(bot,".clientless adventure status 133")})
|
||||
assert(testbot.teleport(bot,0,original.x,original.y,original.z,orientation))
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"return marker")
|
||||
assert(testbot.command(bot,".tele add codex_velaanna_return_20261107").success)
|
||||
testbot.record("return-marker","codex_velaanna_return_20261107")
|
||||
testbot.wait(0)
|
||||
testbot.command(bot,".clientless adventure intent 133 rest the_gilded_rose 180")
|
||||
testbot.command(bot,".combatstop Velaanna")
|
||||
assert(testbot.command(bot,".tele name Velaanna Stormwind").success)
|
||||
assert(testbot.command(bot,".tele Stormwind").success)
|
||||
testbot.await(function() return testbot.online(bot) end,10000,"Stormwind")
|
||||
testbot.wait(12000)
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.command(bot,".dismount")
|
||||
testbot.record("call-pet",testbot.command(bot,".cast self 883"))
|
||||
testbot.wait(2000)
|
||||
local function field(index)
|
||||
local out=testbot.command(bot,".debug getvalue "..index)
|
||||
return tonumber(out.output[1]:match("(%d+)%s*$")) or 0
|
||||
end
|
||||
local function petGuid()
|
||||
testbot.select(bot,"Velaanna")
|
||||
local low,high=field(10),field(11)
|
||||
if low==0 and high==0 then return nil end
|
||||
return string.format("%u",(high << 32) | low)
|
||||
end
|
||||
local pet=petGuid()
|
||||
if pet then
|
||||
local before=testbot.target_state(bot,pet)
|
||||
testbot.record("pet-before",{guid=pet,state=before})
|
||||
testbot.select(bot,pet)
|
||||
local owner=field(16)
|
||||
testbot.record("pet-owner",owner)
|
||||
if owner==133 and before and before.alive then
|
||||
testbot.record("kill-pet",testbot.command(bot,".die"))
|
||||
local auto=false
|
||||
for i=1,20 do
|
||||
testbot.wait(1000)
|
||||
local current=petGuid()
|
||||
local state=current and testbot.target_state(bot,current) or nil
|
||||
testbot.record("automatic-revive-sample",{pet=state})
|
||||
if state and state.alive then auto=true;break end
|
||||
end
|
||||
testbot.check(auto,"automatic native out-of-combat pet revival")
|
||||
if not auto then
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.command(bot,".cast self 982")
|
||||
testbot.wait(12000)
|
||||
end
|
||||
local restored=petGuid()
|
||||
if restored then
|
||||
local state=testbot.target_state(bot,restored)
|
||||
if state and state.alive then
|
||||
testbot.select(bot,restored)
|
||||
if field(16)==133 then testbot.command(bot,".debug setvalue 26 "..state.max_health)end
|
||||
end
|
||||
end
|
||||
end
|
||||
else testbot.check(false,"pet available for revival test")end
|
||||
testbot.select(bot,"Velaanna")
|
||||
testbot.command(bot,".combatstop Velaanna")
|
||||
testbot.record("return-hunter",testbot.command(bot,".tele name Velaanna codex_velaanna_return_20261107"))
|
||||
testbot.record("restore-schedule",testbot.command(bot,".clientless adventure schedule 133 on"))
|
||||
testbot.command(bot,".tele del codex_velaanna_return_20261107")
|
||||
testbot.command(bot,".gm off")
|
||||
@@ -53,6 +53,30 @@ checks prevent casting into nearby unengaged hostile creatures. Hunter pets are
|
||||
loaded or created through native tame/pet functions; Warlock summons and Unholy
|
||||
ghouls use native spells. Pet AI assists against the owner's current combat target.
|
||||
|
||||
## Companion recovery and ranged positioning
|
||||
|
||||
Companion maintenance runs before group following and instance-entrance waiting,
|
||||
including outside combat and in groups led by a player. Hunters revive their
|
||||
current or stored dead pet with native self-targeted Revive Pet (982), or call a
|
||||
living stored pet with Call Pet (883). A failed call never provisions a replacement
|
||||
for an existing saved pet. Warlocks and Unholy death knights retain their native
|
||||
summons. Mounted, airborne, falling, taxi, transport, teleport and dead states defer
|
||||
maintenance. Active companion casts hold ordinary movement; native resource,
|
||||
cast-time and cooldown requirements remain in force. Failed attempts retry after
|
||||
three seconds.
|
||||
|
||||
Ranged fighters intersect the ranges of their known offensive rotation spells,
|
||||
including learned ranks, native minimum ranges, combat reach, ranged-weapon range
|
||||
and spell range modifiers. Short-range utility and area effects do not set the
|
||||
fighting distance. The preferred distance is 70% into that band; retreat begins
|
||||
below 35%, approach near the maximum range. Hysteresis lets a valid reposition
|
||||
finish. Up to eight approach/retreat directions are checked through normal ground
|
||||
navigation, at most once per two seconds. Existing casts are allowed to finish.
|
||||
A failed retreat does not disable still-legal attacks; persistently unreachable
|
||||
targets use the existing twenty-second release interval. `COMBAT_REPOSITION` logs
|
||||
the measured distance and chosen native range band. These changes do not broaden
|
||||
proactive target selection or random monster pulls.
|
||||
|
||||
## Actual and performative visits
|
||||
|
||||
Only player-containing groups enter actual encounter mode. Bot-only visits retain
|
||||
|
||||
@@ -52,3 +52,33 @@ zero-rank placeholder could become CHANGED before its first INSERT. SetSkill now
|
||||
marks persistence state before learning rewarded spells; the regression exercises
|
||||
actual recursive activation. Failed flight-departure roots now honor the existing
|
||||
executor blacklist when replanning.
|
||||
|
||||
## Hourly travel checkpoint rescue (2026-11-06)
|
||||
|
||||
AdventureBots now have an additional watch independent of local displacement.
|
||||
At a real hourly boundary an unfinished journey is checkpointed. At the next
|
||||
boundary, no new physically reached TravelGraph node means capital rescue is
|
||||
due. Replans, changed fallback destinations, wandering and spline chunks do not
|
||||
count. Nodes are deduplicated during the journey so cycling between previously
|
||||
visited nodes cannot renew progress indefinitely. Passing nodes while attached
|
||||
to a transport, on a taxi, airborne or falling is not a completed section.
|
||||
|
||||
The watch runs before group-follow, transport and behavior early returns. It
|
||||
therefore also covers a previous intent stuck waiting for a graph handover.
|
||||
Performances at an arrived destination, browser waits already at their capital,
|
||||
and active instances/raids/battlegrounds/encounters are excluded. The watch is
|
||||
runtime state: login establishes the current hour, not a fabricated past hour;
|
||||
the first subsequent boundary arms it and the next can trigger rescue.
|
||||
|
||||
Rescue operates on the individual bot regardless of group membership. It keeps
|
||||
the group, verifies faction/level access, capital zone and a supporting floor at
|
||||
the Stormwind/Orgrimmar teleport point before cancelling movement. Combat/death
|
||||
wait for their normal controller. Flight, casting and native transport get at
|
||||
most sixty additional seconds; native teleport then releases passenger/vehicle
|
||||
links, taxi and flight state are cleared, and the current daily plan resumes.
|
||||
No unverified destination is used if validation or native teleport fails; the
|
||||
pending rescue retries and records its reason.
|
||||
|
||||
`clientless adventure status <guid>` includes hourly watch state. Navigation logs
|
||||
contain `HOURLY_TRAVEL_CHECK`, `HOURLY_TRAVEL_RESCUE_DUE`,
|
||||
`HOURLY_TRAVEL_RESCUE_WAIT` and `HOURLY_TRAVEL_RESCUE_COMPLETE`.
|
||||
@@ -256,3 +256,16 @@ Der Client sendet unbekannte Slashbefehle nicht an den Server. Für direktes
|
||||
WoW-Client kopieren und das Addon aktivieren bzw. `/reload` ausführen. Es sendet
|
||||
`/AI Text` als normale Flüsternachricht an den eigenen Charakter. Ohne Addon
|
||||
funktioniert `/s /AI Text` (für Spieler in der Nähe sichtbar).
|
||||
|
||||
Bei abgelehnten freien Flugsegmenten enthält `adventurebot-navigation.log`
|
||||
`FLIGHT_CORRIDOR_REJECT` mit Bot-GUID, Start-/Rückkehrstatus, Kennzeichnung des
|
||||
vertikalen Versuchs und Ablehnungszahlen. `FLIGHT_CORRIDOR_DETAIL` ergänzt die
|
||||
letzte konkrete Ablehnung und separat den vertikalen Versuch: Prüfpunkt,
|
||||
Boden-/Terrain-/Höhenobergrenze, Sicherheitsabstand, Abtastindex oder die beiden
|
||||
Endpunkte des blockierten Körperstrahls (`collision-ray`). Bei Strahlen bezeichnet
|
||||
`margin` die Strahlhöhe über den Füßen. Die Diagnose ändert keine Flugprüfung.
|
||||
`lookahead-surface-invalid` bezeichnet eine fehlende gültige Probe für die
|
||||
nominale Flughöhe. Solche Proben werden aus der Höhenstatistik ausgeschlossen;
|
||||
die lokale Kandidatensuche und der geprüfte vertikale Fallback bleiben möglich.
|
||||
Jeder tatsächliche Korridor benötigt weiterhin gültige Oberflächendaten und
|
||||
freie Körperstrahlen. `verticalAttempted` zeigt, ob dieser Versuch stattfand.
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ClientlessPlayerMgr.h"
|
||||
#include "ClientlessActionExecutorMgr.h"
|
||||
#include "ClientlessTravelMgr.h"
|
||||
#include "ClientlessTransportMgr.h"
|
||||
#include "ClientlessTravelGraphMgr.h"
|
||||
#include "ClientlessPerceptionMgr.h"
|
||||
#include "ClientlessFlightMgr.h"
|
||||
@@ -1478,6 +1479,103 @@ void AdventureBehaviorMgr::Micro(Player * player, Record & r)
|
||||
TC_LOG_INFO("server.adventurebot", "MICRO_START guid=%u intent='%s' location='%s' action='%s' durationMs=%u", player->GetGUID().GetCounter(), r.Intent.c_str(), r.Location.c_str(), a.Key.c_str(), r.MicroTimer);
|
||||
}
|
||||
|
||||
bool AdventureBehaviorMgr::UpdateHourlyTravelRescue(Player* player)
|
||||
{
|
||||
uint32 guid=player->GetGUID().GetCounter();
|
||||
auto it=_records.find(guid);
|
||||
if(it==_records.end() || !it->second.Enabled || !player->IsInWorld() ||
|
||||
sClientlessPlayerMgr->IsShutdownDraining() || sClientlessPlayerMgr->IsSafeLogoutPending(guid))return false;
|
||||
auto& r=it->second;auto& watch=r.HourlyTravel;auto now=GameTime::GetGameTime();
|
||||
if(r.HourlyCheckAt==now)return watch.PendingAt && player->IsAlive() && !player->IsInCombat();
|
||||
r.HourlyCheckAt=now;
|
||||
auto local=Local(now);local.tm_min=local.tm_sec=0;
|
||||
time_t hour=mktime(&local); // Preserve tm_isdst across repeated civil hours.
|
||||
bool excluded=player->GetMap()->IsDungeon() || player->InBattleground() || sAdventureEncounterMgr->Active(player);
|
||||
bool waitingAtDestination=r.State==Phase::WaitingGroup && r.WaitingArrived && !r.WaitingTravel;
|
||||
bool arrived=(r.State==Phase::OnSite && !r.Dirty) || waitingAtDestination;
|
||||
// Anticipate the real hourly schedule change before SetWanted runs. A
|
||||
// blocked previous intent can otherwise prevent observing that boundary.
|
||||
bool scheduledChange=r.Schedule && r.Hour!=local.tm_hour &&
|
||||
(r.Plan[local.tm_hour].Intent!=r.Intent || r.Plan[local.tm_hour].Location!=r.Location);
|
||||
bool travelling=!excluded && !waitingAtDestination && (!arrived || scheduledChange) &&
|
||||
(!r.Intent.empty() || !r.WantedIntent.empty());
|
||||
std::string checkpoint;
|
||||
if(travelling && !player->GetTransport() && !player->GetVehicle() && !player->IsInFlight() &&
|
||||
!player->IsFlying() && !player->IsFalling() && !player->IsBeingTeleported() && sClientlessTravelGraphMgr->EnsureLoaded())
|
||||
{
|
||||
float distance=0;std::string node;
|
||||
if(sClientlessTravelGraphMgr->FindNearestNodeToPosition(player->GetMapId(),player->GetPositionX(),
|
||||
player->GetPositionY(),player->GetPositionZ(),node,distance) && distance<=3.0f &&
|
||||
sAdventureAreaMgr->AllowsNode(player,*sClientlessTravelGraphMgr->FindNode(node)))
|
||||
checkpoint=std::to_string(player->GetMapId())+":"+node;
|
||||
}
|
||||
auto previousHour=watch.Hour;bool wasPending=watch.PendingAt!=0;
|
||||
watch.Observe(now,hour,travelling,checkpoint);
|
||||
if(travelling && watch.Hour!=previousHour && watch.Armed)
|
||||
TC_LOG_INFO("server.adventurebot.navigation","HOURLY_TRAVEL_CHECK guid=%u hour=%llu phase=%u section='%s' checkpoint='%s' progress=%llu pending=%u",
|
||||
guid,static_cast<unsigned long long>(hour),uint32(r.State),r.Location.c_str(),watch.Checkpoint.c_str(),
|
||||
static_cast<unsigned long long>(watch.Progress),watch.PendingAt?1u:0u);
|
||||
if(!watch.PendingAt)return false;
|
||||
if(!wasPending)TC_LOG_WARN("server.adventurebot.navigation","HOURLY_TRAVEL_RESCUE_DUE guid=%u phase=%u location='%s' checkpoint='%s'",
|
||||
guid,uint32(r.State),r.Location.c_str(),watch.Checkpoint.c_str());
|
||||
// Combat/death belongs to its normal controller. Native transit gets at
|
||||
// most one minute to finish; a broken ride must not defer rescue forever.
|
||||
if(!player->IsAlive() || player->IsInCombat() || player->IsCharmed())return false;
|
||||
auto ride=sClientlessTransportMgr->GetStatus(guid);
|
||||
bool transit=player->GetTransport() || player->GetVehicle() || player->IsInFlight() ||
|
||||
player->IsFlying() || player->IsFalling() || player->IsBeingTeleported() ||
|
||||
player->HasUnitState(UNIT_STATE_CASTING) || (ride && ride->Phase!=ClientlessTransportPhase::Arrived && ride->Phase!=ClientlessTransportPhase::Failed);
|
||||
if(transit && watch.TransitGrace(now))return true;
|
||||
if(now<r.HourlyRescueRetryAt)return true;
|
||||
r.HourlyRescueRetryAt=now+30;
|
||||
auto deferred=[&](char const* reason)
|
||||
{
|
||||
r.Detail=std::string("hourly travel rescue pending: ")+reason;
|
||||
TC_LOG_WARN("server.adventurebot.navigation","HOURLY_TRAVEL_RESCUE_WAIT guid=%u reason='%s'",guid,reason);
|
||||
return true;
|
||||
};
|
||||
auto city=sObjectMgr->GetGameTeleExactName(player->GetTeamId()==TEAM_ALLIANCE?"Stormwind":"Orgrimmar");
|
||||
if(!city)return deferred("capital unavailable");
|
||||
auto mapEntry=sMapStore.LookupEntry(city->mapId);
|
||||
if(!mapEntry || mapEntry->MapType!=MAP_COMMON)return deferred("capital map invalid");
|
||||
Position target;target.Relocate(city->position_x,city->position_y,city->position_z,city->orientation);
|
||||
if(!sAdventureAreaMgr->EnsureLoaded() || !sAdventureAreaMgr->AllowsPosition(player,city->mapId,target))return deferred("capital access denied");
|
||||
auto terrain=sTerrainMgr.LoadTerrain(city->mapId);
|
||||
uint32 zone=0,area=0;
|
||||
if(terrain)terrain->GetZoneAndAreaId(player->GetPhaseShift(),city->mapId,zone,area,target);
|
||||
if(!AdventureGroupPolicy::Capital(zone?zone:area))return deferred("destination is not a capital");
|
||||
float floor=terrain?terrain->GetStaticHeight(player->GetPhaseShift(),city->mapId,
|
||||
target.GetPositionX(),target.GetPositionY(),target.GetPositionZ()+3,true,8):INVALID_HEIGHT;
|
||||
if(!std::isfinite(floor) || floor<=INVALID_HEIGHT+1 || std::fabs(floor-target.GetPositionZ())>3)return deferred("capital ground unconfirmed");
|
||||
// Validate the destination before interrupting any movement or attachment.
|
||||
if(r.Instance.Active){FinishInstance(player,r);if(r.Instance.Active)return true;}
|
||||
if(player->IsBeingTeleported())player->GetSession()->CompleteClientlessTeleport();
|
||||
if(player->IsBeingTeleported())return true;
|
||||
player->InterruptNonMeleeSpells(false);
|
||||
ResetMicro(player,r);sClientlessPlayerMgr->ClearQueuedActions(guid);
|
||||
sClientlessActionExecutorMgr->Clear(guid);sClientlessFlightMgr->Clear(guid);
|
||||
sAdventureGroupTravelMgr->Clear(player);sClientlessTravelMgr->CancelTravel(guid);
|
||||
if(player->IsInFlight()){player->GetMotionMaster()->MovementExpired();player->CleanupAfterTaxiFlight();}
|
||||
player->GetMotionMaster()->Clear();player->StopMoving();
|
||||
// Native TeleportTo releases vehicles and ship/elevator passenger links.
|
||||
if(!player->TeleportTo(city->mapId,target.GetPositionX(),target.GetPositionY(),target.GetPositionZ(),target.GetOrientation()))return deferred("native teleport rejected");
|
||||
player->GetSession()->CompleteClientlessTeleport();
|
||||
sClientlessTransportMgr->Cancel(guid,player);
|
||||
player->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);player->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
player->SetSwim(false);player->RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING|MOVEMENTFLAG_SWIMMING|MOVEMENTFLAG_FLYING);
|
||||
player->m_movementInfo.pitch=0;player->m_movementInfo.splineElevation=0;player->m_movementInfo.SetFallTime(0);
|
||||
player->SetAnimTier(AnimTier::Ground);player->SetPlayHoverAnim(player->IsHovering() || player->IsGravityDisabled());
|
||||
ClearDeparture(player,r);r.WaitingLocation.clear();r.WaitingTravel=false;r.WaitingArrived=false;r.WaitingRetryAt=0;
|
||||
r.GroupOverride=false;r.Queued=false;r.Dirty=true;r.State=Phase::Idle;r.Hour=-1;r.Timer=0;r.RetryTimer=0;
|
||||
r.LastRescue=now;r.StalledSince=0;r.RescueFailures=0;r.LastTravelFailed=false;r.RescueAt=0;
|
||||
watch.Reset(hour);r.HourlyRescueRetryAt=0;
|
||||
player->SaveToDB();
|
||||
TC_LOG_WARN("server.adventurebot.navigation","HOURLY_TRAVEL_RESCUE_COMPLETE guid=%u city='%s' transitExpired=%u",
|
||||
guid,city->name.c_str(),transit?1u:0u);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AdventureBehaviorMgr::UpdateNavigationRescue(Player* player,Record& r)
|
||||
{
|
||||
auto now=GameTime::GetGameTime();uint32 guid=player->GetGUID().GetCounter();
|
||||
@@ -1921,6 +2019,9 @@ bool AdventureBehaviorMgr::Command(ChatHandler * handler, char const * args)
|
||||
if (op == "status")
|
||||
{
|
||||
handler->PSendSysMessage("Adventure GUID %u: enabled=%u schedule=%u phase=%u intent='%s' location='%s' micro='%s' deadline=%llu detail='%s'", guid, r.Enabled ? 1 : 0, r.Schedule ? 1 : 0, uint32(r.State), r.Intent.c_str(), r.Location.c_str(), r.Micro.c_str(), static_cast < unsigned long long >(r.Deadline), r.Detail.c_str());
|
||||
handler->PSendSysMessage("Hourly travel GUID %u: hour=%llu armed=%u pendingAt=%llu progress=%llu checkpoint='%s'",guid,
|
||||
static_cast<unsigned long long>(r.HourlyTravel.Hour),r.HourlyTravel.Armed?1u:0u,
|
||||
static_cast<unsigned long long>(r.HourlyTravel.PendingAt),static_cast<unsigned long long>(r.HourlyTravel.Progress),r.HourlyTravel.Checkpoint.c_str());
|
||||
return true;
|
||||
}
|
||||
if(op=="micro")
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Position.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "AdventureBehaviorPolicy.h"
|
||||
#include "AdventureHourlyTravelPolicy.h"
|
||||
#include "AdventureSocialActions.h"
|
||||
#include "AdventureInstancePolicy.h"
|
||||
#include "ClientlessCompanionMgr.h"
|
||||
@@ -31,6 +32,7 @@ public:
|
||||
void IntentChanged(Player* player, ClientlessIntent const* intent);
|
||||
void Update(Player* player, uint32 diff);
|
||||
void RefreshDay(Player* player);
|
||||
bool UpdateHourlyTravelRescue(Player* player);
|
||||
void EnterPlayerInstance(Player* player);
|
||||
bool Command(ChatHandler* handler, char const* args);
|
||||
bool PauseForLogout(Player* player);
|
||||
@@ -77,6 +79,8 @@ private:
|
||||
time_t StalledSince=0,LastRescue=0,RescueAt=0,NextSpacing=0,LastNavigationCheck=0;
|
||||
uint32 RescueFailures=0,ProgressMap=0;
|
||||
bool LastTravelFailed=false;
|
||||
AdventureHourlyTravelPolicy::State HourlyTravel;
|
||||
time_t HourlyCheckAt=0,HourlyRescueRetryAt=0;
|
||||
Position ProgressPosition,RescueOrigin;
|
||||
uint32 Date=0, Timer=0, MicroTimer=0, GestureTimer=0, RetryTimer=0;
|
||||
int Hour=-1;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "AdventureGeneratorMgr.h"
|
||||
#include "AdventureEncounterMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Item.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "CombatManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -104,45 +105,74 @@ public:
|
||||
if(Allowed(action,target) && Cast(action.Spell,target))return true;
|
||||
return false;
|
||||
}
|
||||
bool MaintainPet()
|
||||
{
|
||||
auto pet=me->GetPet();
|
||||
if(pet && pet->IsAlive())return false;
|
||||
if(me->getClass()==CLASS_HUNTER)
|
||||
{
|
||||
// Revive Pet is a caster-targeted spell, including stored dead pets.
|
||||
auto saved=me->GetPlayerPetDataCurrent();
|
||||
if((pet && !pet->IsAlive()) || (saved && !saved->SavedHealth))return Cast(982,me);
|
||||
if(saved)return Cast(883,me);
|
||||
// Preserve the existing initial pet provisioning, never replace a
|
||||
// saved pet just because loading/calling it temporarily failed.
|
||||
if(!me->HasSpell(883))return false;
|
||||
for(uint8 slot=PET_SLOT_FIRST;slot<=PET_SLOT_LAST;++slot)
|
||||
if(me->GetPlayerPetDataBySlot(slot))return false;
|
||||
if(auto created=me->CreateTamedPetFrom(299))
|
||||
{
|
||||
if(me->GetMap()->AddToMap(created->ToCreature()))
|
||||
{
|
||||
me->SetMinion(created,true);created->InitTalentForLevel();
|
||||
created->SavePetToDB(PET_SAVE_NEW_PET);me->PetSpellInitialize();
|
||||
return true;
|
||||
}
|
||||
delete created;
|
||||
}
|
||||
}
|
||||
else if(me->getClass()==CLASS_WARLOCK)
|
||||
{
|
||||
if(GetPlayerSpec(me)==1 && Cast(30146,me))return true;
|
||||
return Cast(688,me);
|
||||
}
|
||||
else if(me->getClass()==CLASS_DEATH_KNIGHT && GetPlayerSpec(me)==2)return Cast(46584,me);
|
||||
return false;
|
||||
}
|
||||
std::pair<float,float> AttackRange(Unit* target) const
|
||||
{
|
||||
float minimum=0,maximum=100;
|
||||
bool found=false;
|
||||
auto actions=AdventureRotationPolicy::Damage(me->getClass(),GetPlayerSpec(me));
|
||||
if(me->getClass()==CLASS_HUNTER)actions.push_back({75});
|
||||
for(auto const& action:actions)
|
||||
{
|
||||
if(action.Self)continue;
|
||||
uint32 rank=me->HasSpell(action.Spell)?action.Spell:0;
|
||||
uint32 next=rank?sSpellMgr->GetNextSpellInChain(rank):sSpellMgr->GetFirstSpellInChain(action.Spell);
|
||||
while(next && me->HasSpell(next)){rank=next;next=sSpellMgr->GetNextSpellInChain(rank);}
|
||||
auto info=sSpellMgr->GetSpellInfo(rank);
|
||||
if(!info || !info->RangeEntry || info->IsPositive() || info->IsAffectingArea())continue;
|
||||
float low=me->GetSpellMinRangeForTarget(target,info);
|
||||
float high=me->GetSpellMaxRangeForTarget(target,info);
|
||||
// Short-range utility must not pull casters into melee range.
|
||||
if(high<=10)continue;
|
||||
float reach=me->GetCombatReach()+target->GetCombatReach();
|
||||
if(info->RangeEntry->Flags & SPELL_RANGE_RANGED)low+=me->GetMeleeRange(target);
|
||||
else if(low>0)low+=reach;
|
||||
if(info->HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT))
|
||||
if(auto weapon=me->GetWeaponForAttack(RANGED_ATTACK,true))high*=weapon->GetTemplate()->GetRangedModRange()*0.01f;
|
||||
me->ApplySpellMod(info,SpellModOp::Range,high);
|
||||
minimum=std::max(minimum,low);maximum=std::min(maximum,high+reach);found=true;
|
||||
}
|
||||
return found && maximum>minimum?std::make_pair(minimum,maximum):std::make_pair(0.0f,0.0f);
|
||||
}
|
||||
void Tick(Unit* target,uint32)
|
||||
{
|
||||
me->SetFacingToObject(target);
|
||||
if(me->HasUnitState(UNIT_STATE_CASTING))return;
|
||||
if(auto pet=me->GetPet())
|
||||
{
|
||||
if(pet->IsAlive() && pet->GetVictim()!=target)pet->AI()->AttackStart(target);
|
||||
if(!pet->IsAlive())
|
||||
{
|
||||
if(me->getClass()==CLASS_HUNTER && Cast(982,pet))return;
|
||||
if(me->getClass()==CLASS_WARLOCK && Cast(688,me))return;
|
||||
}
|
||||
}
|
||||
else if(me->getClass()==CLASS_WARLOCK)
|
||||
{
|
||||
if(GetPlayerSpec(me)==1 && Cast(30146,me))return;
|
||||
if(Cast(688,me))return;
|
||||
}
|
||||
else if(me->getClass()==CLASS_DEATH_KNIGHT && GetPlayerSpec(me)==2)
|
||||
{
|
||||
if(Cast(46584,me))return;
|
||||
}
|
||||
else if(me->getClass()==CLASS_HUNTER && me->HasSpell(883))
|
||||
{
|
||||
if(auto creature=sObjectMgr->GetCreatureTemplate(299))
|
||||
if(creature->type==CREATURE_TYPE_BEAST)
|
||||
{
|
||||
auto pet=me->SummonPet(0,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation(),HUNTER_PET,0);
|
||||
if(!pet)if(auto created=me->CreateTamedPetFrom(299))
|
||||
{
|
||||
if(me->GetMap()->AddToMap(created->ToCreature()))
|
||||
{
|
||||
me->SetMinion(created,true);created->InitTalentForLevel();
|
||||
created->SavePetToDB(PET_SAVE_NEW_PET);me->PetSpellInitialize();
|
||||
}
|
||||
else delete created;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(me->getClass()==CLASS_WARRIOR && !me->HasAura(6673) && Cast(6673,me))return;
|
||||
if(me->getClass()==CLASS_HUNTER && !me->HasAura(13165) && Cast(13165,me))return;
|
||||
if(me->getClass()==CLASS_PALADIN && !me->HasAura(31801) && !me->HasAura(20154))
|
||||
@@ -860,14 +890,15 @@ bool AdventureCombatMgr::Update(Player* p,uint32 diff)
|
||||
auto c=ObjectAccessor::GetUnit(*p,r.Target);
|
||||
if(!Valid(p,c,r.Training) || (r.Until && GameTime::GetGameTime()>=r.Until) || p->GetExactDist(c)>80)
|
||||
{Finish(p,r);return true;}
|
||||
if(!Reachable(p,c) && !(r.AI->Ranged() && p->GetExactDist(c)<=25 && p->IsWithinLOSInMap(c)))
|
||||
if(r.AI->Ranged())return RangedCombat(p,r,c);
|
||||
if(!Reachable(p,c))
|
||||
{
|
||||
r.UnreachableMs+=500;
|
||||
if(r.UnreachableMs>=20000){TC_LOG_WARN("server.adventurebot","COMBAT_TARGET_UNREACHABLE guid=%u",p->GetGUID().GetCounter());Finish(p,r);}
|
||||
return true;
|
||||
}
|
||||
r.UnreachableMs=0;
|
||||
bool inRange=r.AI->Ranged()?(p->GetExactDist(c)<=25 && p->IsWithinLOSInMap(c)):p->IsWithinMeleeRange(c);
|
||||
bool inRange=p->IsWithinMeleeRange(c);
|
||||
if(!inRange)
|
||||
{
|
||||
auto nav=sClientlessTravelMgr->GetStatus(p->GetGUID().GetCounter());
|
||||
@@ -885,6 +916,97 @@ bool AdventureCombatMgr::Update(Player* p,uint32 diff)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AdventureCombatMgr::MaintainPet(Player* p)
|
||||
{
|
||||
if(!p->IsInWorld() || !p->IsAlive() || p->IsBeingTeleported() || p->GetTransport() ||
|
||||
p->IsInFlight() || p->IsFlying() || p->IsFalling() || p->IsMounted() || p->IsCharmed())return false;
|
||||
if(auto spell=p->GetCurrentSpell(CURRENT_GENERIC_SPELL))
|
||||
{
|
||||
auto id=spell->GetSpellInfo()->Id;
|
||||
// Hold follow/idle movement while a native companion cast completes.
|
||||
if(id==982 || id==883 || id==688 || id==30146 || id==46584)return true;
|
||||
}
|
||||
if(p->HasUnitState(UNIT_STATE_CASTING))return false;
|
||||
auto pet=p->GetPet();
|
||||
if(pet && pet->IsAlive())return false;
|
||||
auto& r=_records[p->GetGUID().GetCounter()];
|
||||
auto now=GameTime::GetGameTime();
|
||||
if(now<r.NextPet)return false;
|
||||
r.NextPet=now+3;
|
||||
if(p->getClass()==CLASS_HUNTER)
|
||||
{
|
||||
if(!p->HasSpell(883) && !p->HasSpell(982))return false;
|
||||
if(!pet && !p->GetPlayerPetDataCurrent())
|
||||
for(uint8 slot=PET_SLOT_FIRST;slot<=PET_SLOT_LAST;++slot)
|
||||
if(p->GetPlayerPetDataBySlot(slot))return false;
|
||||
}
|
||||
else if(p->getClass()==CLASS_WARLOCK){if(!p->HasSpell(688) && !p->HasSpell(30146))return false;}
|
||||
else if(p->getClass()==CLASS_DEATH_KNIGHT){if(PlayerAI::GetPlayerSpec(p)!=2 || !p->HasSpell(46584))return false;}
|
||||
else return false;
|
||||
if(!r.Support)r.Support=std::make_shared<Fighter>(p);
|
||||
// Cast-time summons/revival need a stationary caster, also when following a
|
||||
// human leader. Native spell checks still enforce mana/cooldowns/reagents.
|
||||
p->StopMoving();
|
||||
return r.Support->MaintainPet();
|
||||
}
|
||||
|
||||
bool AdventureCombatMgr::RangedCombat(Player* p,Record& r,Unit* target)
|
||||
{
|
||||
auto range=r.AI->AttackRange(target);
|
||||
float span=range.second-range.first;
|
||||
if(span<=0){r.AI->Tick(target,500);return true;}
|
||||
float desired=range.first+span*0.70f;
|
||||
float close=range.first+span*0.35f;
|
||||
float far=range.second-std::min(3.0f,span*0.1f);
|
||||
float distance=p->GetExactDist(target);
|
||||
bool los=p->IsWithinLOSInMap(target);
|
||||
auto nav=sClientlessTravelMgr->GetStatus(p->GetGUID().GetCounter());
|
||||
bool moving=nav && nav->State==ClientlessTravelState::Moving;
|
||||
// Hysteresis: finish a valid reposition rather than stopping at the first
|
||||
// yard inside the trigger band. Never interrupt an ongoing spell to move.
|
||||
bool reposition=distance<close || distance>far || !los;
|
||||
if(moving && los && std::fabs(distance-desired)>2 &&
|
||||
std::fabs(nav->Target.GetExactDist(target)-desired)<4)return true;
|
||||
if(!p->HasUnitState(UNIT_STATE_CASTING) && reposition)
|
||||
{
|
||||
auto now=GameTime::GetGameTime();
|
||||
if(now>=r.NextPosition)
|
||||
{
|
||||
r.NextPosition=now+2;
|
||||
float angle=target->GetAngle(p);
|
||||
// Try alternate approaches/retreats. Every candidate uses the same
|
||||
// MMAP and area validation as normal ground travel, never a jump.
|
||||
for(float offset:{0.0f,0.6f,-0.6f,1.2f,-1.2f,2.0f,-2.0f,3.14159265f})
|
||||
{
|
||||
Position end;
|
||||
target->GetNearPoint(p,end.m_positionX,end.m_positionY,end.m_positionZ,
|
||||
std::max(0.5f,desired-target->GetCombatReach()-p->GetCombatReach()),angle+offset);
|
||||
if(!target->IsWithinLOS(end.GetPositionX(),end.GetPositionY(),end.GetPositionZ()+p->GetCollisionHeight()))continue;
|
||||
ClientlessPathDiagnostics path;
|
||||
if(!sClientlessTravelMgr->AnalyzePath(p,end,path) || !path.Complete || path.Suspicious || path.PathLength>100)continue;
|
||||
if(sClientlessTravelMgr->StartTravel(p,end))
|
||||
{
|
||||
TC_LOG_INFO("server.adventurebot","COMBAT_REPOSITION guid=%u distance=%.2f desired=%.2f min=%.2f max=%.2f",
|
||||
p->GetGUID().GetCounter(),distance,desired,range.first,range.second);
|
||||
r.UnreachableMs=0;return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// A blocked retreat must not prevent pets or still-usable attacks. Native
|
||||
// spell validation decides which attacks remain legal at this distance.
|
||||
sClientlessTravelMgr->CancelTravel(p->GetGUID().GetCounter());
|
||||
if(!p->HasUnitState(UNIT_STATE_CASTING))p->StopMoving();
|
||||
r.AI->Tick(target,500);
|
||||
if(!los || distance>range.second)
|
||||
{
|
||||
r.UnreachableMs+=500;
|
||||
if(r.UnreachableMs>=20000)Finish(p,r);
|
||||
}
|
||||
else r.UnreachableMs=0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AdventureCombatMgr::Busy(Player* player) const
|
||||
{
|
||||
if(player->GetGroup())for(auto ally:AdventureAllies(player))if(ally->IsAlive() && ally->IsInCombat())return true;
|
||||
|
||||
@@ -17,6 +17,7 @@ class TC_GAME_API AdventureCombatMgr
|
||||
public:
|
||||
static AdventureCombatMgr* instance();
|
||||
bool Update(Player* player,uint32 diff);
|
||||
bool MaintainPet(Player* player);
|
||||
void DamageTaken(Player* player,Unit* attacker,uint32 damage);
|
||||
void Revived(Player* player,time_t when);
|
||||
void Offline(Player* player);
|
||||
@@ -35,7 +36,7 @@ private:
|
||||
ObjectGuid Target,Helper;
|
||||
std::deque<ObjectGuid> Damagers;
|
||||
bool Fleeing=false,Training=false,Defending=false,Suspended=false,Dead=false,CemeteryPending=false;
|
||||
time_t Until=0,NextCorpseSearch=0,NextPvP=0,NextEscape=0,NextRole=0;
|
||||
time_t Until=0,NextCorpseSearch=0,NextPvP=0,NextEscape=0,NextRole=0,NextPet=0,NextPosition=0;
|
||||
std::vector<Position> FailedCorpsePoints,ThreatPositions;
|
||||
uint32 Timer=0,UnreachableMs=0,Cooldown=0;
|
||||
int PreparedMode=-1;
|
||||
@@ -51,6 +52,7 @@ private:
|
||||
Creature* Proactive(Player* player) const;
|
||||
bool Flee(Player* player,Record& record);
|
||||
bool Death(Player* player,Record& record);
|
||||
bool RangedCombat(Player* player,Record& record,Unit* target);
|
||||
bool GroupHeal(Player* player,Record& record);
|
||||
bool GroupTarget(Player* player,Record& record);
|
||||
void Finish(Player* player,Record& record);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef VCORE_ADVENTURE_HOURLY_TRAVEL_POLICY_H
|
||||
#define VCORE_ADVENTURE_HOURLY_TRAVEL_POLICY_H
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace AdventureHourlyTravelPolicy
|
||||
{
|
||||
// A checkpoint is a physically reached real graph node, never a replan,
|
||||
// recovery wander endpoint, spline chunk or a newly selected destination.
|
||||
struct State
|
||||
{
|
||||
std::int64_t Hour = 0, PendingAt = 0;
|
||||
std::uint64_t Progress = 0, Baseline = 0;
|
||||
bool Armed = false;
|
||||
std::string Checkpoint;
|
||||
std::unordered_set<std::string> Visited;
|
||||
|
||||
void Reset(std::int64_t hour) { *this = {}; Hour = hour; }
|
||||
void Observe(std::int64_t now, std::int64_t hour, bool travelling, std::string const& checkpoint)
|
||||
{
|
||||
if (!travelling || (Hour && hour < Hour)) { Reset(hour); return; }
|
||||
if (!checkpoint.empty() && Visited.insert(checkpoint).second)
|
||||
{ ++Progress; Checkpoint = checkpoint; }
|
||||
if (!Hour) { Hour = hour; return; } // Login is not an hourly intent change.
|
||||
if (hour == Hour) return;
|
||||
if (Armed && Progress == Baseline && !PendingAt && hour - Hour >= 3600) PendingAt = now;
|
||||
Hour = hour; Baseline = Progress; Armed = true;
|
||||
}
|
||||
bool TransitGrace(std::int64_t now) const { return PendingAt && now - PendingAt < 60; }
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -1050,7 +1050,25 @@ bool ClientlessFlightMgr::Advance(Player * player, Record & record, bool handoff
|
||||
else
|
||||
{
|
||||
auto const memory = record.Memory;
|
||||
next = Next(current, goal, record.Settings, record.Memory, sample, ray, false, !record.Returning);
|
||||
Diagnostics diagnostics;
|
||||
next = Next(current, goal, record.Settings, record.Memory, sample, ray, false, !record.Returning, &diagnostics);
|
||||
if(!next.Valid)
|
||||
{
|
||||
TC_LOG_WARN("server.adventurebot.navigation",
|
||||
"FLIGHT_CORRIDOR_REJECT guid=%u departure=%u returning=%u verticalAttempted=%u rejectsOrigin=%u rejectsSurface=%u rejectsFloor=%u rejectsCeiling=%u rejectsRay=%u",
|
||||
player->GetGUID().GetCounter(),record.Memory.Departed?0u:1u,record.Returning?1u:0u,
|
||||
diagnostics.VerticalAttempted?1u:0u,diagnostics.Origin,diagnostics.SurfaceInvalid,diagnostics.Floor,diagnostics.Ceiling,diagnostics.RayBlocked);
|
||||
auto report=[&](char const* kind,Rejection const& failure)
|
||||
{
|
||||
TC_LOG_WARN("server.adventurebot.navigation",
|
||||
"FLIGHT_CORRIDOR_DETAIL guid=%u kind='%s' reason='%s' from=(%.3f %.3f %.3f) to=(%.3f %.3f %.3f) at=(%.3f %.3f %.3f) ground=%.3f terrainFloor=%.3f ceiling=%.3f margin=%.3f index=%d",
|
||||
player->GetGUID().GetCounter(),kind,failure.Reason,failure.From.X,failure.From.Y,failure.From.Z,
|
||||
failure.To.X,failure.To.Y,failure.To.Z,failure.At.X,failure.At.Y,failure.At.Z,
|
||||
failure.Sampled.Ground,failure.Sampled.TerrainFloor,failure.Sampled.Ceiling,failure.Margin,failure.Index);
|
||||
};
|
||||
report("last",diagnostics.Last);
|
||||
if(diagnostics.VerticalAttempted)report("vertical",diagnostics.Vertical);
|
||||
}
|
||||
// Reissuing the same endpoint would only restart its final milliseconds.
|
||||
// Let that spline finish instead; keep planning memory unchanged.
|
||||
if (handoff && next.Valid && Distance(next.Next, PointOf(record.Segment)) < 1)
|
||||
|
||||
@@ -43,6 +43,21 @@ namespace ClientlessFlightPath
|
||||
bool Valid = false, Avoiding = false, Landing = false;
|
||||
bool UnderOverhang = false;
|
||||
};
|
||||
// Optional bounded diagnostics; geometry decisions remain identical without it.
|
||||
struct Rejection
|
||||
{
|
||||
char const* Reason = "none";
|
||||
Point From, To, At;
|
||||
Surface Sampled;
|
||||
float Margin = 0;
|
||||
int Index = -1;
|
||||
};
|
||||
struct Diagnostics
|
||||
{
|
||||
unsigned Origin = 0, SurfaceInvalid = 0, Floor = 0, Ceiling = 0, RayBlocked = 0;
|
||||
bool VerticalAttempted = false;
|
||||
Rejection Last, Vertical;
|
||||
};
|
||||
using Sample = std::function < Surface(float, float) >;
|
||||
using Ray = std::function < bool(Point const &, Point const &) >;
|
||||
inline float Horizontal(Point const & a, Point const & b)
|
||||
@@ -60,11 +75,17 @@ namespace ClientlessFlightPath
|
||||
a.X +(b.X - a.X) * t, a.Y +(b.Y - a.Y) * t, a.Z +(b.Z - a.Z) * t
|
||||
};
|
||||
}
|
||||
inline bool Corridor(Point const & from, Point const & to, Point const & goal, Settings const & cfg, Sample const & sample, Ray const & ray, bool departure = false, bool underOverhang = false)
|
||||
inline bool Corridor(Point const & from, Point const & to, Point const & goal, Settings const & cfg, Sample const & sample, Ray const & ray, bool departure = false, bool underOverhang = false, Diagnostics* diagnostics = nullptr)
|
||||
{
|
||||
int const count = std::max(1, int(std::ceil(Distance(from, to) / 5)));
|
||||
Surface const origin = sample(from.X, from.Y);
|
||||
if (! origin.Valid) return false;
|
||||
auto reject = [&](char const* reason, Point at, Surface surface, float margin, int index)
|
||||
{
|
||||
if (diagnostics) diagnostics->Last = {reason,from,to,at,surface,margin,index};
|
||||
return false;
|
||||
};
|
||||
if (! origin.Valid)
|
||||
{if(diagnostics)++diagnostics->Origin;return reject("origin-invalid",from,origin,0,-1);}
|
||||
for (int i = 0; i <= count; ++ i)
|
||||
{
|
||||
Point p = Mix(from, to, float(i) / count);
|
||||
@@ -77,8 +98,12 @@ namespace ClientlessFlightPath
|
||||
// MAX_HEIGHT reports the TOP of a platform, not the support floor
|
||||
// beneath an airborne bot. Only a checked elevated escape may use
|
||||
// air below that surface; all volume rays still apply.
|
||||
if (! s.Valid || ! std::isfinite(s.Ground) || ! std::isfinite(s.Ceiling) ||
|
||||
p.Z + 0.5f < (underOverhang?std::min(s.Ground,s.TerrainFloor):s.Ground) + margin || p.Z + 5 > s.Ceiling) return false;
|
||||
if (!s.Valid || !std::isfinite(s.Ground) || !std::isfinite(s.Ceiling))
|
||||
{if(diagnostics)++diagnostics->SurfaceInvalid;return reject("surface-invalid",p,s,margin,i);}
|
||||
if (p.Z + 0.5f < (underOverhang?std::min(s.Ground,s.TerrainFloor):s.Ground) + margin)
|
||||
{if(diagnostics)++diagnostics->Floor;return reject("floor-clearance",p,s,margin,i);}
|
||||
if (p.Z + 5 > s.Ceiling)
|
||||
{if(diagnostics)++diagnostics->Ceiling;return reject("ceiling-clearance",p,s,margin,i);}
|
||||
}
|
||||
// A volume, not one center ray. Keep the lower rays above foot level so
|
||||
// a valid ground departure/touchdown does not intersect the ground plane.
|
||||
@@ -114,17 +139,27 @@ namespace ClientlessFlightPath
|
||||
{
|
||||
to.X + offset.X, to.Y + offset.Y, to.Z + height
|
||||
};
|
||||
if (! ray(a, b)) return false;
|
||||
if (! ray(a, b))
|
||||
{
|
||||
if(diagnostics){++diagnostics->RayBlocked;diagnostics->Last={"collision-ray",a,b,a,{},height,-1};}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
inline Result Next(Point const & from, Point const & goal, Settings const & cfg, Memory & memory, Sample const & sample, Ray const & ray, bool airborneGoal = false, bool verticalEscape = false)
|
||||
inline Result Next(Point const & from, Point const & goal, Settings const & cfg, Memory & memory, Sample const & sample, Ray const & ray, bool airborneGoal = false, bool verticalEscape = false, Diagnostics* diagnostics = nullptr)
|
||||
{
|
||||
if(diagnostics)*diagnostics={};
|
||||
auto checkedCorridor = [&](Point const& a,Point const& b,Point const& target,Settings const& settings,
|
||||
Sample const& surfaces,Ray const& rays,bool departure=false,bool underOverhang=false)
|
||||
{return Corridor(a,b,target,settings,surfaces,rays,departure,underOverhang,diagnostics);};
|
||||
float const distance = Horizontal(from, goal);
|
||||
Surface const here = sample(from.X, from.Y), end = sample(goal.X, goal.Y);
|
||||
if (! here.Valid || ! end.Valid || (!airborneGoal && std::fabs(end.Ground - goal.Z) > 2.5f)) return
|
||||
if (! here.Valid || ! end.Valid || (!airborneGoal && std::fabs(end.Ground - goal.Z) > 2.5f))
|
||||
{
|
||||
};
|
||||
if(diagnostics)diagnostics->Last={!here.Valid?"origin-invalid":!end.Valid?"goal-invalid":"goal-height-mismatch",from,goal,!here.Valid?from:goal,!here.Valid?here:end,2.5f,-1};
|
||||
return {};
|
||||
}
|
||||
// Issuing a takeoff spline is not proof of actual clearance. Handoffs
|
||||
// may replan while that spline is still close to its support surface.
|
||||
if (!memory.Departed && from.Z >= here.Ground + cfg.Safety)
|
||||
@@ -135,7 +170,7 @@ namespace ClientlessFlightPath
|
||||
Point hover{goal.X,goal.Y,goal.Z+10};
|
||||
bool steep = goal.Z-from.Z > distance*cfg.Slope;
|
||||
bool blockedAscent = memory.Departed && distance<=100 && !steep && goal.Z>from.Z &&
|
||||
!Corridor(from,goal,goal,cfg,sample,ray);
|
||||
!checkedCorridor(from,goal,goal,cfg,sample,ray);
|
||||
if (memory.Departed && memory.Elevated==Phase::None && distance<=100 &&
|
||||
(steep || blockedAscent))
|
||||
{
|
||||
@@ -144,16 +179,16 @@ namespace ClientlessFlightPath
|
||||
// A diagonal shortcut through the platform is never substituted.
|
||||
float best=std::numeric_limits<float>::infinity();
|
||||
Point column;
|
||||
if (!Corridor(hover,goal,goal,cfg,sample,ray)) return {};
|
||||
if (!checkedCorridor(hover,goal,goal,cfg,sample,ray)) return {};
|
||||
for(float radius : {0.f,25.f,50.f,100.f,150.f})
|
||||
for(unsigned i=0;i<(radius==0?1u:16u);++i)
|
||||
{
|
||||
float a=float(i)*6.283185307f/16;
|
||||
Point low{from.X+radius*std::cos(a),from.Y+radius*std::sin(a),from.Z};
|
||||
Point high{low.X,low.Y,hover.Z};
|
||||
if(!Corridor(from,low,goal,cfg,sample,ray,false,true) ||
|
||||
!Corridor(low,high,goal,cfg,sample,ray) ||
|
||||
!Corridor(high,hover,goal,cfg,sample,ray)) continue;
|
||||
if(!checkedCorridor(from,low,goal,cfg,sample,ray,false,true) ||
|
||||
!checkedCorridor(low,high,goal,cfg,sample,ray) ||
|
||||
!checkedCorridor(high,hover,goal,cfg,sample,ray)) continue;
|
||||
float score=radius+Distance(low,high)+Distance(high,hover);
|
||||
if(score<best){best=score;column=low;}
|
||||
}
|
||||
@@ -176,25 +211,25 @@ namespace ClientlessFlightPath
|
||||
}
|
||||
bool escape=memory.Elevated==Phase::Escape;
|
||||
// Check the full remaining leg, not just the next 25 yards.
|
||||
if(!Corridor(from,waypoint,goal,cfg,sample,ray,false,escape))return {};
|
||||
if(!checkedCorridor(from,waypoint,goal,cfg,sample,ray,false,escape))return {};
|
||||
Point next=Mix(from,waypoint,std::min(1.f,cfg.Step/std::max(0.1f,Distance(from,waypoint))));
|
||||
return {next,true,false,memory.Elevated==Phase::Descend,escape};
|
||||
}
|
||||
// A short, low final descent need not open another horizontal approach.
|
||||
// Validate the entire landing volume, including obstacles and terrain.
|
||||
if (memory.Departed && from.Z>=goal.Z && from.Z-goal.Z<=12 &&
|
||||
Distance(from,goal)<=cfg.Step && Corridor(from,goal,goal,cfg,sample,ray,false))
|
||||
Distance(from,goal)<=cfg.Step && checkedCorridor(from,goal,goal,cfg,sample,ray,false))
|
||||
return {goal,true,false,true};
|
||||
// A normal diagonal touchdown remains the first choice. When the bot
|
||||
// is already above the landing column and there is not enough lateral
|
||||
// room for that slope, descend in the verified column instead of
|
||||
// opening another wide approach.
|
||||
if (memory.Departed && distance < 2.0f && from.Z > goal.Z + 1.5f &&
|
||||
Corridor(from,goal,goal,cfg,sample,ray,false))
|
||||
checkedCorridor(from,goal,goal,cfg,sample,ray,false))
|
||||
return {goal,true,false,true};
|
||||
if (distance < 2 && std::fabs(from.Z - goal.Z) < 1.5f) return
|
||||
{
|
||||
goal, Corridor(from, goal, goal, cfg, sample, ray, true), false, true
|
||||
goal, checkedCorridor(from, goal, goal, cfg, sample, ray, true), false, true
|
||||
};
|
||||
float ux = distance > 0.1f ?(goal.X - from.X) / distance : memory.HeadingX;
|
||||
float uy = distance > 0.1f ?(goal.Y - from.Y) / distance : memory.HeadingY;
|
||||
@@ -204,19 +239,29 @@ namespace ClientlessFlightPath
|
||||
memory.HeadingY = uy;
|
||||
}
|
||||
std::array < float, 5 > heights;
|
||||
unsigned heightCount = 0;
|
||||
float ceiling = here.Ceiling;
|
||||
for (unsigned i = 0; i < heights.size(); ++ i)
|
||||
{
|
||||
float d = std::min(distance, float(i) * cfg.Lookahead / 4);
|
||||
Surface s = sample(from.X + ux * d, from.Y + uy * d);
|
||||
if (! s.Valid) return
|
||||
if (! s.Valid)
|
||||
{
|
||||
};
|
||||
heights[i] = s.Ground;
|
||||
if(diagnostics)
|
||||
{
|
||||
++diagnostics->SurfaceInvalid;
|
||||
diagnostics->Last={"lookahead-surface-invalid",from,goal,{from.X+ux*d,from.Y+uy*d,from.Z},s,0,int(i)};
|
||||
}
|
||||
// A missing nominal-height sample is not a blocked local air
|
||||
// column. Keep searching; every candidate still validates its
|
||||
// own complete corridor against real surface and volume data.
|
||||
continue;
|
||||
}
|
||||
heights[heightCount++] = s.Ground;
|
||||
ceiling = std::min(ceiling, s.Ceiling);
|
||||
}
|
||||
std::sort(heights.begin(), heights.end());
|
||||
float desired = heights[2] + cfg.Clearance;
|
||||
std::sort(heights.begin(), heights.begin() + heightCount);
|
||||
float desired = (heightCount ? heights[heightCount / 2] : here.Ground) + cfg.Clearance;
|
||||
// Reserve enough ascent distance for elevated destinations rather than
|
||||
// following low terrain until the tower is immediately in front of us.
|
||||
if(goal.Z>from.Z)desired=std::max(desired,goal.Z+10-distance*cfg.Slope*0.8f);
|
||||
@@ -272,7 +317,7 @@ namespace ClientlessFlightPath
|
||||
if (! departure && approach && angle == 0 && extraRise == 0 && distance <= horizon && std::fabs(from.Z - goal.Z) <= distance * cfg.Slope) far = goal;
|
||||
if (departure && far.Z <= from.Z + 0.5f) continue;
|
||||
if (Distance(from, far) < 0.5f ||(Horizontal(from, far) < 1 && std::fabs(far.Z - from.Z) > 2)) continue;
|
||||
if (! Corridor(from, far, goal, cfg, sample, ray, departure)) continue;
|
||||
if (! checkedCorridor(from, far, goal, cfg, sample, ray, departure)) continue;
|
||||
float score = Distance(far, goal) + run + std::fabs(angle) * 20 + std::max(0.0f, extraRise) * 0.4f + std::fabs(far.Z - desired) * 0.5f;
|
||||
bool const openApproach = approach && angle == 0 && extraRise == 0;
|
||||
if (!openApproach && score >= bestScore) continue;
|
||||
@@ -299,10 +344,14 @@ namespace ClientlessFlightPath
|
||||
float const top = std::min(here.Ceiling - 6.0f,
|
||||
std::max(from.Z + 20.0f, here.Ground + std::min(cfg.Clearance, 35.0f)));
|
||||
Point vertical{from.X,from.Y,top};
|
||||
if (top > from.Z + 2.0f && Corridor(from,vertical,goal,cfg,sample,ray,true))
|
||||
if(diagnostics)diagnostics->VerticalAttempted=true;
|
||||
if (top > from.Z + 2.0f)
|
||||
{
|
||||
return {vertical,true,!departure,false};
|
||||
if(checkedCorridor(from,vertical,goal,cfg,sample,ray,true))
|
||||
return {vertical,true,!departure,false};
|
||||
if(diagnostics)diagnostics->Vertical=diagnostics->Last;
|
||||
}
|
||||
else if(diagnostics)diagnostics->Vertical={"vertical-rise-limited",from,vertical,from,here,2.0f,-1};
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,11 @@ public:
|
||||
sClientlessLuaEngine->UpdateWorldPresence(player,sAdventureBehaviorMgr->InteractionIntent(player));
|
||||
// Browser responses remain independent of combat and supply animations.
|
||||
sAdventureGroupMgr->UpdateBrowser(player);
|
||||
// Hourly recovery also observes blocked handovers and native transit;
|
||||
// neither group following nor a waiting old intent may bypass it.
|
||||
if(sAdventureBehaviorMgr->UpdateHourlyTravelRescue(player))return;
|
||||
sAdventureGroupTravelMgr->Observe(player,diff);
|
||||
if(sAdventureCombatMgr->MaintainPet(player))return;
|
||||
if(sAdventureGroupTravelMgr->HoldForInstanceLeader(player))return;
|
||||
sAdventurePopulationMgr->Maintain(player,diff);
|
||||
// Restart restores native ship attachment, but CPC ride execution is
|
||||
|
||||
@@ -117,6 +117,7 @@ struct PlayerAI{static unsigned GetPlayerSpec(Player*){return 0;}};
|
||||
code+=header+r'''
|
||||
class AdventureCombatMgr::Fighter{public:bool Ranged(){return false;}int ticks=0;void Tick(Unit*,uint32){++ticks;}};
|
||||
|
||||
bool AdventureCombatMgr::RangedCombat(Player*,Record&,Unit*){assert(false);return true;}
|
||||
bool AdventureCombatMgr::GroupHeal(Player*,Record&){return false;}
|
||||
Unit* groupChoice=nullptr;
|
||||
bool AdventureCombatMgr::GroupTarget(Player*p,Record&r){return groupChoice?Start(p,r,groupChoice,false,true,0):false;}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Exercise production pet decisions and ranged ground repositioning with world adapters."""
|
||||
from pathlib import Path
|
||||
import subprocess, tempfile
|
||||
root=Path(__file__).resolve().parents[2]
|
||||
s=(root/'src/server/game/World/AdventureCombatMgr.cpp').read_text()
|
||||
def body(signature):
|
||||
a=s.index(signature);b=s.index('{',a);e=b+1;depth=1
|
||||
while depth:
|
||||
depth+=(s[e]=='{')-(s[e]=='}');e+=1
|
||||
return s[a:e]
|
||||
code=r'''
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
#include "AdventureRotationPolicy.h"
|
||||
using uint32=unsigned;using uint8=unsigned char;
|
||||
constexpr int CURRENT_GENERIC_SPELL=1,SPELL_RANGE_RANGED=1,SPELL_ATTR0_USES_RANGED_SLOT=1,RANGED_ATTACK=2;
|
||||
namespace SpellModOp{constexpr int Range=1;}
|
||||
constexpr int CLASS_HUNTER=3,CLASS_WARLOCK=9,CLASS_DEATH_KNIGHT=6,HUNTER_PET=1,PET_SAVE_NEW_PET=1,PET_SLOT_FIRST=0,PET_SLOT_LAST=20,UNIT_STATE_CASTING=1;
|
||||
#define TC_LOG_INFO(...) ((void)0)
|
||||
struct Position{float m_positionX=0,m_positionY=0,m_positionZ=0;float GetPositionX()const{return m_positionX;}float GetPositionY()const{return m_positionY;}float GetPositionZ()const{return m_positionZ;}float GetExactDist(Position const*p)const{return std::hypot(m_positionX-p->m_positionX,m_positionY-p->m_positionY);}};
|
||||
struct Guid{unsigned GetCounter(){return 1;}};
|
||||
struct Unit:Position{bool alive=true,los=true;bool IsAlive(){return alive;}float GetCombatReach(){return 1.5f;}float GetAngle(Unit*p){return std::atan2(p->m_positionY-m_positionY,p->m_positionX-m_positionX);}bool IsWithinLOS(float,float,float){return los;}void GetNearPoint(Unit*,float&x,float&y,float&z,float d,float a){x=m_positionX+(d+3)*std::cos(a);y=m_positionY+(d+3)*std::sin(a);z=0;}};
|
||||
struct Pet:Unit{Pet*ToCreature(){return this;}void InitTalentForLevel(){}void SavePetToDB(int){}};
|
||||
struct Saved{unsigned SavedHealth=10;};
|
||||
struct Map{bool AddToMap(Pet*){return true;}}map;
|
||||
struct RangeData{unsigned Flags=0;};
|
||||
struct SpellInfo{unsigned Id=982;RangeData*RangeEntry=nullptr;float low=0,high=0;bool positive=false,area=false,ranged=false;bool IsPositive(){return positive;}bool IsAffectingArea(){return area;}bool HasAttribute(int){return ranged;}};
|
||||
struct SpellManager{std::unordered_map<unsigned,SpellInfo>infos;unsigned GetNextSpellInChain(unsigned id){return id==133?143:0;}unsigned GetFirstSpellInChain(unsigned id){return id;}SpellInfo*GetSpellInfo(unsigned id){auto i=infos.find(id);return i==infos.end()?nullptr:&i->second;}}spellManager;
|
||||
#define sSpellMgr (&spellManager)
|
||||
struct ItemTemplate{float GetRangedModRange(){return 100;}};
|
||||
struct Weapon{ItemTemplate item;ItemTemplate*GetTemplate(){return &item;}};struct Spell{SpellInfo info;SpellInfo*GetSpellInfo(){return &info;}};
|
||||
struct Player:Unit{
|
||||
Pet*pet=nullptr;Saved*saved=nullptr;bool anySaved=false,knows=true,casting=false,stopped=false;unsigned klass=CLASS_HUNTER,spec=0;int created=0;bool mounted=false,flight=false,falling=false,transport=false,teleport=false,charmed=false;Spell*spell=nullptr;
|
||||
bool IsInWorld(){return true;}bool IsBeingTeleported(){return teleport;}bool GetTransport(){return transport;}bool IsInFlight(){return flight;}bool IsFlying(){return flight;}bool IsFalling(){return falling;}bool IsMounted(){return mounted;}bool IsCharmed(){return charmed;}Spell*GetCurrentSpell(int){return spell;}
|
||||
Pet*GetPet(){return pet;}unsigned getClass(){return klass;}Saved*GetPlayerPetDataCurrent(){return saved;}Saved*GetPlayerPetDataBySlot(int){return anySaved?saved:nullptr;}bool HasSpell(int){return knows;}
|
||||
float GetSpellMinRangeForTarget(Unit*,SpellInfo*i){return i->low;}float GetSpellMaxRangeForTarget(Unit*,SpellInfo*i){return i->high;}float GetMeleeRange(Unit*){return 5;}Weapon*GetWeaponForAttack(int,bool){return nullptr;}void ApplySpellMod(SpellInfo*,int,float&){}
|
||||
Pet*CreateTamedPetFrom(int){++created;return new Pet;}Map*GetMap(){return ↦}void SetMinion(Pet*,bool){}void PetSpellInitialize(){}
|
||||
Guid GetGUID(){return {};}bool IsWithinLOSInMap(Unit*t){return t->los;}bool HasUnitState(int){return casting;}float GetCollisionHeight(){return 2;}void StopMoving(){stopped=true;}
|
||||
};
|
||||
unsigned GetPlayerSpec(Player*p){return p->spec;}
|
||||
namespace PlayerAI{unsigned GetPlayerSpec(Player*p){return p->spec;}}
|
||||
struct Fighter{
|
||||
Fighter()=default;explicit Fighter(Player*p):me(p){}
|
||||
Player*me=nullptr;unsigned cast=0,ticks=0;Unit*castTarget=nullptr;bool castOK=true;
|
||||
std::pair<float,float>range{5,35};
|
||||
bool Cast(unsigned id,Unit*t){cast=id;castTarget=t;return castOK;}
|
||||
std::pair<float,float>AttackRange(Unit*){return range;}void Tick(Unit*,unsigned){++ticks;}
|
||||
'''+body(' std::pair<float,float> AttackRange(').replace('AttackRange(', 'NativeRange(')+body(' bool MaintainPet()')+r'''
|
||||
};
|
||||
struct ClientlessPathDiagnostics{bool Complete=true,Suspicious=false;float PathLength=30;};
|
||||
enum class ClientlessTravelState{Idle,Moving};
|
||||
struct Nav{ClientlessTravelState State=ClientlessTravelState::Idle;Position Target;};
|
||||
struct Travel{
|
||||
Nav nav;bool paths=true,start=true;int probes=0,starts=0,cancels=0;unsigned reject=0;
|
||||
Nav const*GetStatus(unsigned){return &nav;}
|
||||
bool AnalyzePath(Player*,Position const&,ClientlessPathDiagnostics&d){++probes;d.Complete=paths && unsigned(probes)>reject;return true;}
|
||||
bool StartTravel(Player*,Position const&p){++starts;nav.Target=p;nav.State=ClientlessTravelState::Moving;return start;}
|
||||
void CancelTravel(unsigned){++cancels;nav.State=ClientlessTravelState::Idle;}
|
||||
}travel;
|
||||
#define sClientlessTravelMgr (&travel)
|
||||
namespace GameTime{long now=100;long GetGameTime(){return now;}}
|
||||
struct Record{std::shared_ptr<Fighter>AI=std::make_shared<Fighter>(),Support;long NextPet=0;unsigned UnreachableMs=0;long NextPosition=0;bool finished=false;};
|
||||
struct Combat{std::unordered_map<unsigned,Record>_records;bool MaintainPet(Player*);void Finish(Player*,Record&r){r.finished=true;}bool RangedCombat(Player*,Record&,Unit*);};
|
||||
'''+body('bool AdventureCombatMgr::MaintainPet(').replace('AdventureCombatMgr::','Combat::')+body('bool AdventureCombatMgr::RangedCombat(').replace('AdventureCombatMgr::','Combat::')+r'''
|
||||
int main(){
|
||||
Player p;Pet pet;Saved saved;Fighter f;f.me=&p;p.pet=&pet;
|
||||
RangeData ranges;
|
||||
spellManager.infos[75]={75,&ranges,5,35,false,false,true};ranges.Flags=SPELL_RANGE_RANGED;
|
||||
auto band=f.NativeRange(&pet);assert(band.first==10 && band.second==38);
|
||||
p.klass=8;p.spec=1;ranges.Flags=0;spellManager.infos[133]={133,&ranges,0,30};spellManager.infos[143]={143,&ranges,0,35};
|
||||
band=f.NativeRange(&pet);assert(band.first==0 && band.second==38); // highest learned rank, reach
|
||||
spellManager.infos[2136]={2136,&ranges,0,8};p.spec=1;
|
||||
band=f.NativeRange(&pet);assert(band.second==38); // short utility cannot collapse the range band
|
||||
p.klass=CLASS_HUNTER;p.spec=0;
|
||||
assert(!f.MaintainPet() && !f.cast); // living companion left intact
|
||||
pet.alive=false;assert(f.MaintainPet() && f.cast==982 && f.castTarget==&p);
|
||||
p.pet=nullptr;p.saved=&saved;saved.SavedHealth=0;
|
||||
assert(f.MaintainPet() && f.cast==982 && f.castTarget==&p && !p.created);
|
||||
saved.SavedHealth=10;assert(f.MaintainPet() && f.cast==883 && !p.created);
|
||||
p.saved=nullptr;p.knows=false;assert(!f.MaintainPet() && !p.created);
|
||||
p.knows=true;p.anySaved=true;p.saved=&saved;f.castOK=false;
|
||||
assert(!f.MaintainPet() && !p.created); // call failure cannot replace an existing pet
|
||||
p.klass=CLASS_WARLOCK;p.spec=1;f.castOK=true;assert(f.MaintainPet() && f.cast==30146 && f.castTarget==&p);
|
||||
p.klass=CLASS_DEATH_KNIGHT;p.spec=2;assert(f.MaintainPet() && f.cast==46584);
|
||||
Combat c;p.klass=CLASS_HUNTER;p.spec=0;p.saved=&saved;saved.SavedHealth=0;p.pet=&pet;pet.alive=false;
|
||||
p.mounted=true;assert(!c.MaintainPet(&p) && !p.stopped);
|
||||
p.mounted=false;p.flight=true;assert(!c.MaintainPet(&p));p.flight=false;
|
||||
p.transport=true;assert(!c.MaintainPet(&p));p.transport=false;
|
||||
p.teleport=true;assert(!c.MaintainPet(&p));p.teleport=false;
|
||||
assert(c.MaintainPet(&p) && p.stopped && c._records[1].Support->castTarget==&p);
|
||||
assert(!c.MaintainPet(&p)); // retry interval
|
||||
Spell active;p.spell=&active;assert(c.MaintainPet(&p)); // hold an ongoing Revive cast even during retry interval
|
||||
active.info.Id=999;assert(!c.MaintainPet(&p));p.spell=nullptr;
|
||||
Unit target;Record r;p.m_positionX=7;
|
||||
assert(c.RangedCombat(&p,r,&target));assert(travel.starts==1 && r.AI->ticks==0);
|
||||
assert(std::fabs(travel.nav.Target.GetExactDist(&target)-26)<0.01); // 70% of native band
|
||||
p.m_positionX=18;c.RangedCombat(&p,r,&target);assert(travel.starts==1 && !travel.cancels); // no half-yard stop/restart
|
||||
p.m_positionX=26;c.RangedCombat(&p,r,&target);assert(r.AI->ticks==1 && travel.cancels==1);
|
||||
travel={};r={};p.m_positionX=60;GameTime::now+=3;travel.reject=2;
|
||||
c.RangedCombat(&p,r,&target);assert(travel.probes==3 && travel.starts==1); // alternate valid corridor
|
||||
travel={};r={};p.m_positionX=7;travel.paths=false;GameTime::now+=3;
|
||||
c.RangedCombat(&p,r,&target);assert(travel.probes==8 && !travel.starts && r.AI->ticks==1); // blocked retreat still attacks
|
||||
c.RangedCombat(&p,r,&target);assert(travel.probes==8 && r.AI->ticks==2); // bounded retry
|
||||
travel={};r={};p.casting=true;GameTime::now+=3;
|
||||
c.RangedCombat(&p,r,&target);assert(!travel.starts && !travel.probes); // never abort a cast for spacing
|
||||
p.casting=false;travel.paths=false;target.los=false;GameTime::now+=3;
|
||||
for(int i=0;i<40;++i)c.RangedCombat(&p,r,&target);
|
||||
assert(r.finished); // unreachable targets do not retain combat forever
|
||||
}
|
||||
'''
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
src=Path(tmp)/'combat.cpp';exe=Path(tmp)/'combat';src.write_text(code)
|
||||
subprocess.run(['g++','-std=c++17','-I'+str(root/'src/server/game/World'),'-fsanitize=address,undefined','-fno-omit-frame-pointer',str(src),'-o',str(exe)],check=True)
|
||||
subprocess.run([str(exe)],check=True)
|
||||
print('Production pet decisions and ranged approach/retreat, hysteresis, alternate paths, cast and failure handling passed.')
|
||||
@@ -0,0 +1,54 @@
|
||||
"""Exercise production corridor diagnostics without changing flight decisions."""
|
||||
from pathlib import Path
|
||||
import subprocess,tempfile
|
||||
root=Path(__file__).resolve().parents[2]
|
||||
code=r'''
|
||||
#include "ClientlessFlightPath.h"
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
using namespace ClientlessFlightPath;
|
||||
int main(){
|
||||
Settings cfg;Diagnostics d;auto flat=[](float,float){return Surface{0,600,true};};
|
||||
auto clear=[](Point const&,Point const&){return true;};
|
||||
auto blocked=[](Point const&,Point const&){return false;};
|
||||
assert(!Corridor({0,0,-2},{0,0,35},{200,0,0},cfg,flat,clear,true,false,&d));
|
||||
assert(d.Floor==1 && !strcmp(d.Last.Reason,"floor-clearance") && d.Last.Index==0);
|
||||
d={};auto ceiling=[](float,float){return Surface{0,10,true};};
|
||||
assert(!Corridor({0,0,0},{0,0,8},{200,0,0},cfg,ceiling,clear,true,false,&d));assert(d.Ceiling==1);
|
||||
d={};assert(!Corridor({0,0,0},{0,0,35},{200,0,0},cfg,flat,blocked,true,false,&d));
|
||||
assert(d.RayBlocked==1 && !strcmp(d.Last.Reason,"collision-ray") && d.Last.From.Z==0.8f && d.Last.To.Z==35.8f);
|
||||
Memory m;assert(!Next({0,0,0},{200,0,0},cfg,m,flat,blocked,false,true,&d).Valid);
|
||||
assert(d.VerticalAttempted && !strcmp(d.Vertical.Reason,"collision-ray"));
|
||||
auto column=[](Point const&a,Point const&b){return Horizontal(a,b)<0.01f;};
|
||||
Memory a,b;auto first=Next({0,0,0},{200,0,0},cfg,a,flat,column,false,true);
|
||||
auto traced=Next({0,0,0},{200,0,0},cfg,b,flat,column,false,true,&d);
|
||||
assert(first.Valid && traced.Valid && Distance(first.Next,traced.Next)==0 && a.Departed==b.Departed);
|
||||
auto unknown=[](float,float){return Surface{};};
|
||||
assert(!Next({0,0,0},{200,0,0},cfg,m,unknown,clear,false,true,&d).Valid);
|
||||
assert(!d.VerticalAttempted && !strcmp(d.Last.Reason,"origin-invalid"));
|
||||
assert(!Next({0,0,0},{200,0,10},cfg,m,flat,clear,false,true,&d).Valid);
|
||||
assert(!strcmp(d.Last.Reason,"goal-height-mismatch"));
|
||||
auto hole=[](float x,float){return x==25?Surface{}:Surface{0,600,true};};
|
||||
Memory holeMemory;
|
||||
auto escaped=Next({0,0,0},{200,0,0},cfg,holeMemory,hole,column,false,true,&d);
|
||||
assert(escaped.Valid && d.VerticalAttempted && d.SurfaceInvalid>=1);
|
||||
assert(escaped.Next.X==0 && escaped.Next.Y==0 && escaped.Next.Z>0);
|
||||
// Unknown data along every nonvertical ray cannot be crossed horizontally.
|
||||
auto wideHole=[](float x,float y){return Horizontal({0,0,0},{x,y,0})>10 && x<150?Surface{}:Surface{0,600,true};};
|
||||
Memory blockedMemory;
|
||||
auto rejected=Next({0,0,0},{200,0,0},cfg,blockedMemory,wideHole,blocked,false,true,&d);
|
||||
assert(!rejected.Valid && d.VerticalAttempted && !strcmp(d.Vertical.Reason,"collision-ray"));
|
||||
Memory safeMemory;
|
||||
auto vertical=Next({0,0,0},{200,0,0},cfg,safeMemory,wideHole,clear,false,true,&d);
|
||||
assert(vertical.Valid && vertical.Next.X==0 && vertical.Next.Y==0);
|
||||
// In-flight recovery is explicit, and a local ceiling still prevents ascent.
|
||||
auto capped=[](float x,float y){return Horizontal({0,0,0},{x,y,0})>10 && x<150?Surface{}:Surface{0,7,true};};
|
||||
Memory cappedMemory;
|
||||
assert(!Next({0,0,0},{200,0,0},cfg,cappedMemory,capped,clear,false,true,&d).Valid);
|
||||
}
|
||||
'''
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
src=Path(tmp)/'test.cpp';src.write_text(code);out=Path(tmp)/'test'
|
||||
subprocess.run(['g++','-std=c++17','-fsanitize=address,undefined','-fno-omit-frame-pointer','-I'+str(root/'src/server/game/World'),str(src),'-o',str(out)],check=True)
|
||||
subprocess.run([str(out)],check=True)
|
||||
print('Flight diagnostics: floor, ceiling, ray endpoints, vertical attempt, early rejection and unchanged result passed.')
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Run the production hourly guard against circular walks and clock boundaries."""
|
||||
from pathlib import Path
|
||||
import subprocess,tempfile
|
||||
root=Path(__file__).resolve().parents[2]
|
||||
code=r'''
|
||||
#include "AdventureHourlyTravelPolicy.h"
|
||||
#include <cassert>
|
||||
using AdventureHourlyTravelPolicy::State;
|
||||
int main(){
|
||||
State s;
|
||||
// A partial login hour is not itself a checkpoint interval.
|
||||
s.Observe(100,0,true,""); // Epoch zero is not a real server date; use nonzero hours.
|
||||
s={};s.Observe(4000,3600,true,"");assert(!s.Armed&&!s.PendingAt);
|
||||
s.Observe(7200,7200,true,"");assert(s.Armed&&!s.PendingAt);
|
||||
// Arbitrary local movement/replans do not supply graph checkpoints.
|
||||
for(int t=7201;t<10800;++t)s.Observe(t,7200,true,"");
|
||||
s.Observe(10800,10800,true,"");assert(s.PendingAt==10800);
|
||||
assert(s.TransitGrace(10859)&&!s.TransitGrace(10860));
|
||||
// A pending rescue is not postponed again by another hour or a new node.
|
||||
s.Observe(14400,14400,true,"0:node");assert(s.PendingAt==10800);
|
||||
// Actual arrival/waiting, active instances and performances clear travel tracking.
|
||||
s.Observe(14401,14400,false,"");assert(!s.PendingAt&&!s.Armed&&s.Visited.empty());
|
||||
// A truly new completed graph checkpoint permits another hourly interval.
|
||||
s.Observe(14402,14400,true,"0:A");
|
||||
s.Observe(18000,18000,true,"0:A");assert(s.Armed&&!s.PendingAt);
|
||||
s.Observe(19000,18000,true,"0:B");s.Observe(21600,21600,true,"0:B");assert(!s.PendingAt);
|
||||
// Going A-B-A-B is not an inexhaustible source of progress.
|
||||
s.Observe(22000,21600,true,"0:A");s.Observe(23000,21600,true,"0:B");
|
||||
s.Observe(25200,25200,true,"0:A");assert(s.PendingAt==25200);
|
||||
// Checkpoints include the map, and only physically reached nodes are supplied.
|
||||
State portal;portal.Observe(4000,3600,true,"0:portal");portal.Observe(7200,7200,true,"0:portal");
|
||||
portal.Observe(8000,7200,true,"530:portal");portal.Observe(10800,10800,true,"530:portal");assert(!portal.PendingAt);
|
||||
// Midnight, unchanged intents, and a repeated local hour still use real elapsed boundaries.
|
||||
State midnight;midnight.Observe(85000,82800,true,"");midnight.Observe(86400,86400,true,"");
|
||||
midnight.Observe(90000,90000,true,"");assert(midnight.PendingAt==90000);
|
||||
// Administrative clock rollback starts a new observation, never an immediate teleport.
|
||||
midnight.Observe(80000,79200,true,"");assert(!midnight.PendingAt&&!midnight.Armed);
|
||||
}
|
||||
'''
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
src=Path(tmp)/'test.cpp';src.write_text(code);out=Path(tmp)/'test'
|
||||
subprocess.run(['g++','-std=c++17','-fsanitize=address,undefined','-fno-omit-frame-pointer','-I'+str(root/'src/server/game/World'),str(src),'-o',str(out)],check=True)
|
||||
subprocess.run([str(out)],check=True)
|
||||
print('Hourly travel policy: two real boundaries, circular movement, graph progress, pending transit deadline, arrival reset and clock changes PASS')
|
||||
@@ -0,0 +1,139 @@
|
||||
"""Compile the production rescue method with native-side effects recorded by stubs."""
|
||||
from pathlib import Path
|
||||
import subprocess,tempfile
|
||||
root=Path(__file__).resolve().parents[2]
|
||||
source=(root/'src/server/game/World/AdventureBehaviorMgr.cpp').read_text()
|
||||
start=source.index('bool AdventureBehaviorMgr::UpdateHourlyTravelRescue(')
|
||||
end=source.index('bool AdventureBehaviorMgr::UpdateNavigationRescue(',start)
|
||||
method=source[start:end]
|
||||
stub=r'''
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include "AdventureHourlyTravelPolicy.h"
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <ctime>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
using uint32=unsigned;using uint64=std::uint64_t;
|
||||
constexpr int TEAM_ALLIANCE=0,MAP_COMMON=0,UNIT_STATE_CASTING=1,INVALID_HEIGHT=-100000,
|
||||
SPELL_AURA_MOUNTED=1,MOVEMENTFLAG_MASK_MOVING=1,MOVEMENTFLAG_SWIMMING=2,MOVEMENTFLAG_FLYING=4,
|
||||
UNIT_NPC_EMOTESTATE=1,UNIT_STAND_STATE_STAND=0;
|
||||
enum class AnimTier{Ground};
|
||||
std::vector<std::string> events;
|
||||
template<class... T>void log(T const&...){}
|
||||
#define TC_LOG_INFO(...) log(__VA_ARGS__)
|
||||
#define TC_LOG_WARN(...) log(__VA_ARGS__)
|
||||
struct Position{float x=0,y=0,z=0,o=0;void Relocate(float a,float b,float c,float d){x=a;y=b;z=c;o=d;}float GetPositionX()const{return x;}float GetPositionY()const{return y;}float GetPositionZ()const{return z;}float GetOrientation()const{return o;}};
|
||||
struct Guid{uint32 GetCounter()const{return 92;}};
|
||||
struct Map{bool dungeon=false;bool IsDungeon(){return dungeon;}};
|
||||
struct Session{void CompleteClientlessTeleport(){events.push_back("ack");}};
|
||||
struct Motion{void MovementExpired(){events.push_back("taxi-expired");}void Clear(){events.push_back("motion-clear");}};
|
||||
struct Player:Position{
|
||||
bool alive=true,combat=false,charmed=false,ship=false,vehicle=false,taxi=false,flying=false,falling=false,porting=false,casting=false,bg=false,accept=true;
|
||||
int team=0;uint32 mapid=530,teleports=0,saves=0;Map map;Session session;Motion motion;
|
||||
struct{float pitch=2,splineElevation=1;void SetFallTime(int){}}m_movementInfo;
|
||||
Guid GetGUID(){return {};}bool IsInWorld(){return true;}Map* GetMap(){return ↦}
|
||||
bool InBattleground(){return bg;}bool IsAlive(){return alive;}bool IsInCombat(){return combat;}bool IsCharmed(){return charmed;}
|
||||
void* GetTransport(){return ship?this:nullptr;}void* GetVehicle(){return vehicle?this:nullptr;}
|
||||
bool IsInFlight(){return taxi;}bool IsFlying(){return flying;}bool IsFalling(){return falling;}bool IsBeingTeleported(){return porting;}
|
||||
bool HasUnitState(int){return casting;}uint32 GetMapId(){return mapid;}int GetPhaseShift(){return 0;}int GetTeamId(){return team;}
|
||||
Session* GetSession(){return &session;}Motion* GetMotionMaster(){return &motion;}
|
||||
void InterruptNonMeleeSpells(bool){casting=false;events.push_back("interrupt");}void StopMoving(){}
|
||||
void CleanupAfterTaxiFlight(){taxi=false;events.push_back("taxi-cleanup");}
|
||||
bool TeleportTo(uint32 m,float a,float b,float c,float d){events.push_back("teleport");if(!accept)return false;++teleports;mapid=m;Relocate(a,b,c,d);ship=vehicle=false;return true;}
|
||||
void RemoveAurasByType(int){flying=false;events.push_back("unmount");}void SetSwim(bool){}void RemoveUnitMovementFlag(int){falling=false;}
|
||||
void SetAnimTier(AnimTier){}void SetPlayHoverAnim(bool){}bool IsHovering(){return false;}bool IsGravityDisabled(){return false;}
|
||||
void SaveToDB(){++saves;}void SetUInt32Value(int,int){}void SetStandState(int){}
|
||||
};
|
||||
std::int64_t clockNow=4000;namespace GameTime{time_t GetGameTime(){return clockNow;}}
|
||||
std::tm Local(time_t t){return *gmtime(&t);}
|
||||
struct Players{bool draining=false,safe=false;bool IsShutdownDraining(){return draining;}bool IsSafeLogoutPending(uint32){return safe;}void ClearQueuedActions(uint32){events.push_back("queue-clear");}}players;
|
||||
auto* sClientlessPlayerMgr=&players;
|
||||
struct Encounters{bool active=false;bool Active(Player*){return active;}}encounters;auto* sAdventureEncounterMgr=&encounters;
|
||||
struct Node{}node;
|
||||
struct Graph{float distance=99;std::string key="A";bool EnsureLoaded(){return true;}bool FindNearestNodeToPosition(uint32,float,float,float,std::string& n,float& d){n=key;d=distance;return true;}Node* FindNode(std::string const&){return &node;}}graph;auto* sClientlessTravelGraphMgr=&graph;
|
||||
struct Areas{bool allowed=true;bool EnsureLoaded(){return true;}bool AllowsNode(Player*,Node const&){return allowed;}bool AllowsPosition(Player*,uint32,Position const&){return allowed;}}areas;auto* sAdventureAreaMgr=&areas;
|
||||
enum class ClientlessTransportPhase{Waiting,Riding,Arrived,Failed};struct Ride{ClientlessTransportPhase Phase=ClientlessTransportPhase::Failed;};
|
||||
struct Transport{Ride ride;Ride* GetStatus(uint32){return &ride;}void Cancel(uint32,Player* p){assert(!p->ship);ride.Phase=ClientlessTransportPhase::Failed;events.push_back("transport-release");}}transport;auto* sClientlessTransportMgr=&transport;
|
||||
struct City{float position_x=1,position_y=2,position_z=3,orientation=0;uint32 mapId=0;std::string name="Stormwind";}city;
|
||||
struct Objects{bool present=true;City* GetGameTeleExactName(char const* name){city.name=name;return present?&city:nullptr;}}objects;auto* sObjectMgr=&objects;
|
||||
struct MapEntry{int MapType=MAP_COMMON;};struct Maps{MapEntry entry;MapEntry* LookupEntry(uint32){return &entry;}}sMapStore;
|
||||
struct Terrain{float floor=3;uint32 zone=1519;float GetStaticHeight(int,uint32,float,float,float,bool,int){return floor;}void GetZoneAndAreaId(int,uint32,uint32& z,uint32& a,Position const&){z=a=zone;}}terrain;
|
||||
struct Terrains{Terrain* LoadTerrain(uint32){return &terrain;}}sTerrainMgr;
|
||||
namespace AdventureGroupPolicy{bool Capital(uint32 a){return a==1519||a==1637;}}
|
||||
struct Executor{void Clear(uint32){events.push_back("executor-clear");}}executor;auto* sClientlessActionExecutorMgr=&executor;
|
||||
struct Flight{void Clear(uint32){events.push_back("flight-clear");}}flight;auto* sClientlessFlightMgr=&flight;
|
||||
struct GroupTravel{void Clear(Player*){events.push_back("group-travel-clear");}}groups;auto* sAdventureGroupTravelMgr=&groups;
|
||||
struct Travel{void CancelTravel(uint32){events.push_back("travel-clear");}}travel;auto* sClientlessTravelMgr=&travel;
|
||||
class AdventureBehaviorMgr{public:
|
||||
enum class Phase{Idle,Travel,OnSite,Switching,Handover,WaitingGroup};
|
||||
struct Slot{std::string Intent,Location;};
|
||||
struct Record{bool Enabled=true,Dirty=false,Schedule=false,WaitingArrived=false,WaitingTravel=false,Queued=false,GroupOverride=false,LastTravelFailed=false;
|
||||
Phase State=Phase::Travel;std::string Intent="economy",WantedIntent,Location="old",Detail,WaitingLocation;
|
||||
std::array<Slot,24>Plan;struct{bool Active=false;}Instance;
|
||||
AdventureHourlyTravelPolicy::State HourlyTravel;time_t HourlyCheckAt=0,HourlyRescueRetryAt=0,WaitingRetryAt=0,LastRescue=0,StalledSince=0,RescueAt=0;
|
||||
int Hour=1;uint32 Timer=0,RetryTimer=0,RescueFailures=0;};
|
||||
std::unordered_map<uint32,Record>_records;
|
||||
void FinishInstance(Player*,Record&r){r.Instance.Active=false;}void ResetMicro(Player*,Record&){}
|
||||
void ClearDeparture(Player*,Record&){}bool UpdateHourlyTravelRescue(Player*);
|
||||
};
|
||||
'''
|
||||
main=r'''
|
||||
|
||||
int main(){
|
||||
setenv("TZ","UTC",1);tzset();
|
||||
auto reset=[](){events.clear();players={};areas={};graph={};transport={};objects={};terrain={};encounters={};sMapStore={};};
|
||||
auto step=[](AdventureBehaviorMgr&m,Player&p,time_t t){clockNow=t;return m.UpdateHourlyTravelRescue(&p);};
|
||||
auto arm=[&](AdventureBehaviorMgr&m,Player&p){m._records[92]={};assert(!step(m,p,4000));assert(!step(m,p,7200));};
|
||||
// Handover/retry state is watched before normal behavior can block the hour.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);m._records[92].State=AdventureBehaviorMgr::Phase::Handover;
|
||||
assert(step(m,p,10800));assert(p.teleports==1&&p.mapid==0&&p.saves==1);assert(!m._records[92].HourlyTravel.PendingAt);}
|
||||
// Ordinary performances and browser waiting in an already reached capital are not travelling.
|
||||
for(auto phase:{AdventureBehaviorMgr::Phase::OnSite,AdventureBehaviorMgr::Phase::WaitingGroup}){
|
||||
reset();AdventureBehaviorMgr m;Player p;m._records[92].State=phase;m._records[92].WaitingArrived=true;
|
||||
assert(!step(m,p,4000));assert(!step(m,p,7200));assert(!step(m,p,10800));assert(!p.teleports);
|
||||
}
|
||||
// An overdue schedule must not turn an admitted capital/browser wait into travel.
|
||||
{reset();AdventureBehaviorMgr m;Player p;auto&r=m._records[92];r.State=AdventureBehaviorMgr::Phase::WaitingGroup;
|
||||
r.WaitingArrived=true;r.Schedule=true;r.Hour=0;r.Plan[1].Intent="raid";
|
||||
assert(!step(m,p,4000));assert(!step(m,p,7200));assert(!step(m,p,10800));assert(!p.teleports);}
|
||||
// Active dungeons/raids and battlegrounds stay protected.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);p.map.dungeon=true;assert(!step(m,p,10800));assert(!p.teleports);}
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);p.bg=true;assert(!step(m,p,10800));assert(!p.teleports);}
|
||||
// A pending rescue waits for combat/death, then continues without a new hour.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);p.combat=true;assert(!step(m,p,10800));assert(m._records[92].HourlyTravel.PendingAt);
|
||||
p.combat=false;p.alive=false;assert(!step(m,p,10810));assert(!p.teleports);
|
||||
p.alive=true;assert(step(m,p,10811));assert(p.teleports==1);}
|
||||
// Native passengers/taxi/flying states cannot defer extraction past sixty seconds.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);p.ship=p.vehicle=p.taxi=p.flying=true;transport.ride.Phase=ClientlessTransportPhase::Riding;
|
||||
assert(step(m,p,10800)&&!p.teleports);assert(step(m,p,10859)&&!p.teleports);assert(step(m,p,10860));
|
||||
assert(p.teleports==1&&!p.ship&&!p.vehicle&&!p.taxi&&!p.flying);
|
||||
auto cleanup=std::find(events.begin(),events.end(),"taxi-cleanup"),clear=std::find(events.begin(),events.end(),"motion-clear");assert(cleanup<clear);
|
||||
}
|
||||
// Access, actual capital zone and supporting ground are checked BEFORE cleanup.
|
||||
for(int reason=0;reason<3;++reason){reset();AdventureBehaviorMgr m;Player p;arm(m,p);
|
||||
if(reason==0)areas.allowed=false;if(reason==1)terrain.zone=1;if(reason==2)terrain.floor=-100000;
|
||||
assert(step(m,p,10800)&&!p.teleports);assert(events.empty());assert(m._records[92].HourlyTravel.PendingAt);
|
||||
areas.allowed=true;terrain.zone=1519;terrain.floor=3;assert(step(m,p,10830));assert(p.teleports==1);
|
||||
}
|
||||
// Horde uses its own capital; no group membership is required or changed.
|
||||
{reset();AdventureBehaviorMgr m;Player p;p.team=1;arm(m,p);assert(step(m,p,10800));assert(city.name=="Orgrimmar");}
|
||||
// Passing a node aboard a stuck ride is NOT a completed travel section.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);p.ship=true;graph.distance=0;
|
||||
assert(step(m,p,10800));assert(m._records[92].HourlyTravel.Progress==0);}
|
||||
// A physically reached new graph node is progress, even if the next section stalls.
|
||||
{reset();AdventureBehaviorMgr m;Player p;graph.distance=0;arm(m,p);graph.key="B";
|
||||
assert(!step(m,p,10800));assert(!p.teleports);assert(step(m,p,14400));assert(p.teleports==1);}
|
||||
// Shutdown/build safe logout remains authoritative.
|
||||
{reset();AdventureBehaviorMgr m;Player p;arm(m,p);players.safe=true;assert(!step(m,p,10800));assert(!p.teleports);}
|
||||
}
|
||||
'''
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
src=Path(tmp)/'test.cpp';src.write_text(stub+method+main);out=Path(tmp)/'test'
|
||||
subprocess.run(['g++','-std=c++17','-fsanitize=address,undefined','-fno-omit-frame-pointer','-I'+str(root/'src/server/game/World'),str(src),'-o',str(out)],check=True)
|
||||
subprocess.run([str(out)],check=True)
|
||||
print('Production hourly rescue: handover, waiting, instances, combat/death, transit deadline, native cleanup, capital permissions/ground, factions, node progress and safe logout PASS')
|
||||
Reference in new issue
Block a user