From c2aa95970d90a53b83e87d690188814d0e1c9d52 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 3 Apr 2024 17:26:46 +0800 Subject: [PATCH 01/14] Improve premade spec links --- conf/playerbots.conf.dist | 88 ++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 416931c4b..7adba6ecb 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -475,28 +475,30 @@ Playerbots.Updates.EnableDatabases = 1 ############################################## # AiPlayerbot.PremadeSpecName.. = #Name of the talent specialisation # AiPlayerbot.PremadeSpecLink... = #Wowhead style link the bot should work towards at given level. +# e.g., formulate the link on https://www.wowhead.com/wotlk/talent-calc/warrior/3022032123335100202012013031251-32505010002 # 0 <= specno < 20, 1 <= level <= 80 # Warrior AiPlayerbot.PremadeSpecName.1.0 = arms pve -AiPlayerbot.PremadeSpecLink.1.0.60 = +AiPlayerbot.PremadeSpecLink.1.0.60 = 3022032023335100202012013031241 AiPlayerbot.PremadeSpecLink.1.0.80 = 3022032123335100202012013031251-32505010002 # AiPlayerbot.PremadeSpecGlyph.1.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecName.1.1 = fury pve -AiPlayerbot.PremadeSpecLink.1.1.60 = +AiPlayerbot.PremadeSpecLink.1.1.60 = -305053000500310053120501351 AiPlayerbot.PremadeSpecLink.1.1.80 = 30202300233-305053000500310153120511351 AiPlayerbot.PremadeSpecName.1.2 = prot pve -AiPlayerbot.PremadeSpecLink.1.2.60 = +AiPlayerbot.PremadeSpecLink.1.2.60 = --053351225000210521030113321 AiPlayerbot.PremadeSpecLink.1.2.80 = 3500030023-301-053351225000210521030113321 # Paladin AiPlayerbot.PremadeSpecName.2.0 = holy pve -AiPlayerbot.PremadeSpecLink.2.0.60 = +AiPlayerbot.PremadeSpecLink.2.0.60 = 50350151020013053100515221 AiPlayerbot.PremadeSpecLink.2.0.80 = 50350152220013053100515221-503201312 AiPlayerbot.PremadeSpecName.2.1 = prot pve -AiPlayerbot.PremadeSpecLink.2.1.60 = +AiPlayerbot.PremadeSpecLink.2.1.60 = -05005135203102311333112321 AiPlayerbot.PremadeSpecLink.2.1.80 = -05005135203132311333312321-5023005 AiPlayerbot.PremadeSpecName.2.2 = ret pve -AiPlayerbot.PremadeSpecLink.2.2.60 = +AiPlayerbot.PremadeSpecLink.2.2.60 = --05230051203331302133231131 +AiPlayerbot.PremadeSpecLink.2.2.65 = -05-05230051203331302133231131 AiPlayerbot.PremadeSpecLink.2.2.80 = 050501-05-05232051203331302133231331 # Hunter @@ -504,83 +506,91 @@ AiPlayerbot.PremadeSpecName.3.0 = bm pve AiPlayerbot.PremadeSpecLink.3.0.60 = 51200201505112243100511351 AiPlayerbot.PremadeSpecLink.3.0.80 = 51200201505112253100531351-015305021 AiPlayerbot.PremadeSpecName.3.1 = mm pve -AiPlayerbot.PremadeSpecLink.3.1.60 = +AiPlayerbot.PremadeSpecLink.3.1.60 = -015305101230013233135030051 AiPlayerbot.PremadeSpecLink.3.1.80 = 502-035305101230013233135031351-5000002 AiPlayerbot.PremadeSpecName.3.2 = surv pve -AiPlayerbot.PremadeSpecLink.3.2.60 = -AiPlayerbot.PremadeSpecLink.3.2.80 = -0053041-5000032500033330523134321331 +AiPlayerbot.PremadeSpecLink.3.2.60 = --5000032500033330502135001331 +AiPlayerbot.PremadeSpecLink.3.2.80 = -005305101-5000032500033330522135301331 # Rogue AiPlayerbot.PremadeSpecName.4.0 = as pve -AiPlayerbot.PremadeSpecLink.4.0.60 = -AiPlayerbot.PremadeSpecLink.4.0.80 = 005323005350100520103331051-005005003-502 +AiPlayerbot.PremadeSpecLink.4.0.60 = 005323005350100520103331051 +AiPlayerbot.PremadeSpecLink.4.0.80 = 005323005350100520103331051-005005005003-2 AiPlayerbot.PremadeSpecName.4.1 = combat pve -AiPlayerbot.PremadeSpecLink.4.1.60 = -AiPlayerbot.PremadeSpecLink.4.1.80 = 30530000522-0252051000035015223100501251 +AiPlayerbot.PremadeSpecLink.4.1.60 = -0252051000035015223100501251 +AiPlayerbot.PremadeSpecLink.4.1.80 = 00532000523-0252051000035015223100501251 AiPlayerbot.PremadeSpecName.4.2 = subtlety pve -AiPlayerbot.PremadeSpecLink.4.2.60 = +AiPlayerbot.PremadeSpecLink.4.2.60 = --5120122030321121050135031241 AiPlayerbot.PremadeSpecLink.4.2.80 = 0053231-2-5120222030321121050135231251 # Priest AiPlayerbot.PremadeSpecName.5.0 = disc pve -AiPlayerbot.PremadeSpecLink.5.0.60 = -AiPlayerbot.PremadeSpecLink.5.0.80 = 0503203130300512331323231251-03530003 +AiPlayerbot.PremadeSpecLink.5.0.60 = 0503203130300512301323131051 +AiPlayerbot.PremadeSpecLink.5.0.80 = 0503203130300512331323231251-03520103 AiPlayerbot.PremadeSpecName.5.1 = holy pve -AiPlayerbot.PremadeSpecLink.5.1.60 = +AiPlayerbot.PremadeSpecLink.5.1.60 = -035050031301152530000331331 AiPlayerbot.PremadeSpecLink.5.1.80 = 05032031-235050032302152530000331351 AiPlayerbot.PremadeSpecName.5.2 = shadow pve -AiPlayerbot.PremadeSpecLink.5.2.60 = +AiPlayerbot.PremadeSpecLink.5.2.60 = --325003041203010323150301351 AiPlayerbot.PremadeSpecLink.5.2.80 = 0503203--325023051223010323152301351 # DeathKnight AiPlayerbot.PremadeSpecName.6.0 = blood pve -AiPlayerbot.PremadeSpecLink.6.0.60 = +AiPlayerbot.PremadeSpecLink.6.0.60 = 0055021533003313201020131151 AiPlayerbot.PremadeSpecLink.6.0.80 = 0355021533003313201020131351-005-005032 AiPlayerbot.PremadeSpecName.6.1 = frost pve -AiPlayerbot.PremadeSpecLink.6.1.60 = -AiPlayerbot.PremadeSpecLink.6.1.80 = 03-32002350352203012300033101351-230200305 +AiPlayerbot.PremadeSpecLink.6.1.60 = -32003350332203012300023101351 +AiPlayerbot.PremadeSpecLink.6.1.80 = -32002350352203012300033101351-230200305003 AiPlayerbot.PremadeSpecGlyph.6.1 = 45805,43673,43547,43544,43672,43543 AiPlayerbot.PremadeSpecName.6.2 = unholy pve -AiPlayerbot.PremadeSpecLink.6.2.60 = -AiPlayerbot.PremadeSpecLink.6.2.80 = 23050202--2302003350032152003150003133151 +AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303330032152000150013130151 +AiPlayerbot.PremadeSpecLink.6.2.80 = -320050500002-2300303330032152000150013133151 +AiPlayerbot.PremadeSpecName.6.3 = double aura blood pve +AiPlayerbot.PremadeSpecLink.6.3.60 = 005512153330030320102013-305 +AiPlayerbot.PremadeSpecLink.6.3.80 = 005512153330030320102013-3050505002023001-002 # Shaman AiPlayerbot.PremadeSpecName.7.0 = ele pve -AiPlayerbot.PremadeSpecLink.7.0.60 = +AiPlayerbot.PremadeSpecLink.7.0.60 = 4530001520213351102301351 AiPlayerbot.PremadeSpecLink.7.0.80 = 3530001523213351322301351-005050031 AiPlayerbot.PremadeSpecName.7.1 = enh pve -AiPlayerbot.PremadeSpecLink.7.1.60 = +AiPlayerbot.PremadeSpecLink.7.1.60 = -30205033005001333031131131051 AiPlayerbot.PremadeSpecLink.7.1.80 = 053030052-30205033005021333031131131051 AiPlayerbot.PremadeSpecName.7.2 = resto pve -AiPlayerbot.PremadeSpecLink.7.2.60 = +AiPlayerbot.PremadeSpecLink.7.2.60 = --50005301335310501002331241 AiPlayerbot.PremadeSpecLink.7.2.80 = -00505031-50005331335310501022331251 # Mage AiPlayerbot.PremadeSpecName.8.0 = arcane pve -AiPlayerbot.PremadeSpecLink.8.0.60 = -AiPlayerbot.PremadeSpecLink.8.0.80 = 235005030100230150323102505321-03-203023001 +AiPlayerbot.PremadeSpecLink.8.0.60 = 23000503110033014032310150532 +AiPlayerbot.PremadeSpecLink.8.0.80 = 23000523310033015032310250532-03-203203001 AiPlayerbot.PremadeSpecName.8.1 = fire pve -AiPlayerbot.PremadeSpecLink.8.1.60 = +AiPlayerbot.PremadeSpecLink.8.1.60 = -0055030012303330053120300351 AiPlayerbot.PremadeSpecLink.8.1.80 = 23000503310003-0055030012303330053120300351 AiPlayerbot.PremadeSpecName.8.2 = frost pve -AiPlayerbot.PremadeSpecLink.8.2.60 = +AiPlayerbot.PremadeSpecLink.8.2.60 = --3533103310203100232102231151 AiPlayerbot.PremadeSpecLink.8.2.80 = 23002322010203--3533103310203100232102231151 # Warlock AiPlayerbot.PremadeSpecName.9.0 = affli pve -AiPlayerbot.PremadeSpecLink.9.0.60 = -AiPlayerbot.PremadeSpecLink.9.0.80 = 2350020021123510253500331151--55000005 +AiPlayerbot.PremadeSpecLink.9.0.60 = 2350022001113510053500131151 +AiPlayerbot.PremadeSpecLink.9.0.70 = 2350022001113510053500131151--55 +AiPlayerbot.PremadeSpecLink.9.0.80 = 2350022001113510253500331151--5500000501 AiPlayerbot.PremadeSpecName.9.1 = emo pve -AiPlayerbot.PremadeSpecLink.9.1.60 = -AiPlayerbot.PremadeSpecLink.9.1.80 = -003203301135212530135211351-55000005 +AiPlayerbot.PremadeSpecLink.9.1.60 = -003203301135112530131201-55 +AiPlayerbot.PremadeSpecLink.9.1.70 = -003203301135112530135201051-55 +AiPlayerbot.PremadeSpecLink.9.1.80 = -003203301135112530135221351-55000005 AiPlayerbot.PremadeSpecName.9.2 = destro pve -AiPlayerbot.PremadeSpecLink.9.2.60 = +AiPlayerbot.PremadeSpecLink.9.2.60 = --05203205210131051313230351 AiPlayerbot.PremadeSpecLink.9.2.80 = -03310030003-05203205210331051335230351 # Druid AiPlayerbot.PremadeSpecName.11.0 = balance pve -AiPlayerbot.PremadeSpecLink.11.0.60 = +AiPlayerbot.PremadeSpecLink.11.0.60 = 5012203115331003213302301231 AiPlayerbot.PremadeSpecLink.11.0.80 = 5012203125331103213305301231--205003212 -AiPlayerbot.PremadeSpecName.11.1 = feral pve -AiPlayerbot.PremadeSpecLink.11.1.60 = +AiPlayerbot.PremadeSpecName.11.1 = bear pve +AiPlayerbot.PremadeSpecLink.11.1.60 = -500232130322110353100301310501 AiPlayerbot.PremadeSpecLink.11.1.80 = -501232130322110353120303313511-20350001 AiPlayerbot.PremadeSpecGlyph.11.1 = 40897,43331,46372,43335,43332 AiPlayerbot.PremadeSpecName.11.2 = resto pve -AiPlayerbot.PremadeSpecLink.11.2.60 = +AiPlayerbot.PremadeSpecLink.11.2.60 = --230033312031501531050013051 AiPlayerbot.PremadeSpecLink.11.2.80 = 05320001--230033312031512531153313051 +AiPlayerbot.PremadeSpecName.11.3 = cat pve +AiPlayerbot.PremadeSpecLink.11.3.60 = -553202032322010052100030310501 +AiPlayerbot.PremadeSpecLink.11.3.80 = -553202032322010053100030310511-205503012 ############################################## # Default TalentSpec for random bots # From 3700ee3a12fc3486fd1fe9f4904483de0e5a5617 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 21:04:49 +0800 Subject: [PATCH 02/14] More glyph config and level check --- conf/playerbots.conf.dist | 44 ++++++++++++++++++++++++++++++++++++--- src/PlayerbotFactory.cpp | 5 ++++- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 7adba6ecb..f66b6ba97 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -475,120 +475,158 @@ Playerbots.Updates.EnableDatabases = 1 ############################################## # AiPlayerbot.PremadeSpecName.. = #Name of the talent specialisation # AiPlayerbot.PremadeSpecLink... = #Wowhead style link the bot should work towards at given level. +# AiPlayerbot.PremadeSpecGlyph.. = ,,,,, # e.g., formulate the link on https://www.wowhead.com/wotlk/talent-calc/warrior/3022032123335100202012013031251-32505010002 # 0 <= specno < 20, 1 <= level <= 80 # Warrior AiPlayerbot.PremadeSpecName.1.0 = arms pve +AiPlayerbot.PremadeSpecGlyph.1.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.1.0.60 = 3022032023335100202012013031241 AiPlayerbot.PremadeSpecLink.1.0.80 = 3022032123335100202012013031251-32505010002 -# AiPlayerbot.PremadeSpecGlyph.1.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecName.1.1 = fury pve +AiPlayerbot.PremadeSpecGlyph.1.1 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.1.1.60 = -305053000500310053120501351 AiPlayerbot.PremadeSpecLink.1.1.80 = 30202300233-305053000500310153120511351 AiPlayerbot.PremadeSpecName.1.2 = prot pve +AiPlayerbot.PremadeSpecGlyph.1.2 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.1.2.60 = --053351225000210521030113321 AiPlayerbot.PremadeSpecLink.1.2.80 = 3500030023-301-053351225000210521030113321 + # Paladin AiPlayerbot.PremadeSpecName.2.0 = holy pve +AiPlayerbot.PremadeSpecGlyph.2.0 = 41106,43367,45741,43369,43365,41109 AiPlayerbot.PremadeSpecLink.2.0.60 = 50350151020013053100515221 AiPlayerbot.PremadeSpecLink.2.0.80 = 50350152220013053100515221-503201312 AiPlayerbot.PremadeSpecName.2.1 = prot pve +AiPlayerbot.PremadeSpecGlyph.2.1 = 41100,43367,43869,43369,43365,45745 AiPlayerbot.PremadeSpecLink.2.1.60 = -05005135203102311333112321 AiPlayerbot.PremadeSpecLink.2.1.80 = -05005135203132311333312321-5023005 AiPlayerbot.PremadeSpecName.2.2 = ret pve +AiPlayerbot.PremadeSpecGlyph.2.2 = 41092,43367,41099,43369,43365,43869 AiPlayerbot.PremadeSpecLink.2.2.60 = --05230051203331302133231131 AiPlayerbot.PremadeSpecLink.2.2.65 = -05-05230051203331302133231131 AiPlayerbot.PremadeSpecLink.2.2.80 = 050501-05-05232051203331302133231331 # Hunter AiPlayerbot.PremadeSpecName.3.0 = bm pve +AiPlayerbot.PremadeSpecGlyph.3.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.3.0.60 = 51200201505112243100511351 AiPlayerbot.PremadeSpecLink.3.0.80 = 51200201505112253100531351-015305021 AiPlayerbot.PremadeSpecName.3.1 = mm pve +AiPlayerbot.PremadeSpecGlyph.3.1 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.3.1.60 = -015305101230013233135030051 AiPlayerbot.PremadeSpecLink.3.1.80 = 502-035305101230013233135031351-5000002 AiPlayerbot.PremadeSpecName.3.2 = surv pve +AiPlayerbot.PremadeSpecGlyph.3.2 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.3.2.60 = --5000032500033330502135001331 AiPlayerbot.PremadeSpecLink.3.2.80 = -005305101-5000032500033330522135301331 + # Rogue AiPlayerbot.PremadeSpecName.4.0 = as pve +AiPlayerbot.PremadeSpecGlyph.4.0 = 45768,43379,45761,43380,43378,45767 AiPlayerbot.PremadeSpecLink.4.0.60 = 005323005350100520103331051 AiPlayerbot.PremadeSpecLink.4.0.80 = 005323005350100520103331051-005005005003-2 AiPlayerbot.PremadeSpecName.4.1 = combat pve +AiPlayerbot.PremadeSpecGlyph.4.1 = 45762,43379,45767,43380,43378,45766 AiPlayerbot.PremadeSpecLink.4.1.60 = -0252051000035015223100501251 AiPlayerbot.PremadeSpecLink.4.1.80 = 00532000523-0252051000035015223100501251 AiPlayerbot.PremadeSpecName.4.2 = subtlety pve +AiPlayerbot.PremadeSpecGlyph.4.2 = 42967,43379,45764,43380,43378,45767 AiPlayerbot.PremadeSpecLink.4.2.60 = --5120122030321121050135031241 AiPlayerbot.PremadeSpecLink.4.2.80 = 0053231-2-5120222030321121050135231251 + # Priest AiPlayerbot.PremadeSpecName.5.0 = disc pve +AiPlayerbot.PremadeSpecGlyph.5.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.5.0.60 = 0503203130300512301323131051 AiPlayerbot.PremadeSpecLink.5.0.80 = 0503203130300512331323231251-03520103 AiPlayerbot.PremadeSpecName.5.1 = holy pve +AiPlayerbot.PremadeSpecGlyph.5.1 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.5.1.60 = -035050031301152530000331331 AiPlayerbot.PremadeSpecLink.5.1.80 = 05032031-235050032302152530000331351 AiPlayerbot.PremadeSpecName.5.2 = shadow pve +AiPlayerbot.PremadeSpecGlyph.5.2 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.5.2.60 = --325003041203010323150301351 AiPlayerbot.PremadeSpecLink.5.2.80 = 0503203--325023051223010323152301351 + # DeathKnight AiPlayerbot.PremadeSpecName.6.0 = blood pve +AiPlayerbot.PremadeSpecGlyph.6.0 = 45805,43673,43827,43544,43672,43554 AiPlayerbot.PremadeSpecLink.6.0.60 = 0055021533003313201020131151 AiPlayerbot.PremadeSpecLink.6.0.80 = 0355021533003313201020131351-005-005032 AiPlayerbot.PremadeSpecName.6.1 = frost pve +AiPlayerbot.PremadeSpecGlyph.6.1 = 45805,43673,43547,43544,43672,43543 AiPlayerbot.PremadeSpecLink.6.1.60 = -32003350332203012300023101351 AiPlayerbot.PremadeSpecLink.6.1.80 = -32002350352203012300033101351-230200305003 -AiPlayerbot.PremadeSpecGlyph.6.1 = 45805,43673,43547,43544,43672,43543 AiPlayerbot.PremadeSpecName.6.2 = unholy pve +AiPlayerbot.PremadeSpecGlyph.6.2 = 43546,43673,45804,43544,43672,43549 AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303330032152000150013130151 AiPlayerbot.PremadeSpecLink.6.2.80 = -320050500002-2300303330032152000150013133151 AiPlayerbot.PremadeSpecName.6.3 = double aura blood pve +AiPlayerbot.PremadeSpecGlyph.6.3 = 45805,43673,43827,43544,43672,43554 AiPlayerbot.PremadeSpecLink.6.3.60 = 005512153330030320102013-305 AiPlayerbot.PremadeSpecLink.6.3.80 = 005512153330030320102013-3050505002023001-002 + # Shaman AiPlayerbot.PremadeSpecName.7.0 = ele pve +AiPlayerbot.PremadeSpecGlyph.7.0 = 41536,43385,41532,43386,44923,45776 AiPlayerbot.PremadeSpecLink.7.0.60 = 4530001520213351102301351 AiPlayerbot.PremadeSpecLink.7.0.80 = 3530001523213351322301351-005050031 AiPlayerbot.PremadeSpecName.7.1 = enh pve +AiPlayerbot.PremadeSpecGlyph.7.1 = 41530,43385,41539,43386,44923,41540 AiPlayerbot.PremadeSpecLink.7.1.60 = -30205033005001333031131131051 AiPlayerbot.PremadeSpecLink.7.1.80 = 053030052-30205033005021333031131131051 AiPlayerbot.PremadeSpecName.7.2 = resto pve +AiPlayerbot.PremadeSpecGlyph.7.2 = 41517,43385,41527,43386,44923,45775 AiPlayerbot.PremadeSpecLink.7.2.60 = --50005301335310501002331241 AiPlayerbot.PremadeSpecLink.7.2.80 = -00505031-50005331335310501022331251 + # Mage AiPlayerbot.PremadeSpecName.8.0 = arcane pve +AiPlayerbot.PremadeSpecGlyph.8.0 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.8.0.60 = 23000503110033014032310150532 AiPlayerbot.PremadeSpecLink.8.0.80 = 23000523310033015032310250532-03-203203001 AiPlayerbot.PremadeSpecName.8.1 = fire pve +AiPlayerbot.PremadeSpecGlyph.8.1 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.8.1.60 = -0055030012303330053120300351 AiPlayerbot.PremadeSpecLink.8.1.80 = 23000503310003-0055030012303330053120300351 AiPlayerbot.PremadeSpecName.8.2 = frost pve +AiPlayerbot.PremadeSpecGlyph.8.2 = 0,0,0,0,0,0 AiPlayerbot.PremadeSpecLink.8.2.60 = --3533103310203100232102231151 AiPlayerbot.PremadeSpecLink.8.2.80 = 23002322010203--3533103310203100232102231151 + # Warlock AiPlayerbot.PremadeSpecName.9.0 = affli pve +AiPlayerbot.PremadeSpecGlyph.9.0 = 45785,43390,50077,43394,43393,45779 AiPlayerbot.PremadeSpecLink.9.0.60 = 2350022001113510053500131151 AiPlayerbot.PremadeSpecLink.9.0.70 = 2350022001113510053500131151--55 AiPlayerbot.PremadeSpecLink.9.0.80 = 2350022001113510253500331151--5500000501 AiPlayerbot.PremadeSpecName.9.1 = emo pve +AiPlayerbot.PremadeSpecGlyph.9.1 = 45785,43390,50077,43394,43393,42459 AiPlayerbot.PremadeSpecLink.9.1.60 = -003203301135112530131201-55 AiPlayerbot.PremadeSpecLink.9.1.70 = -003203301135112530135201051-55 AiPlayerbot.PremadeSpecLink.9.1.80 = -003203301135112530135221351-55000005 AiPlayerbot.PremadeSpecName.9.2 = destro pve +AiPlayerbot.PremadeSpecGlyph.9.2 = 45785,43390,50077,43394,43393,42454 AiPlayerbot.PremadeSpecLink.9.2.60 = --05203205210131051313230351 AiPlayerbot.PremadeSpecLink.9.2.80 = -03310030003-05203205210331051335230351 + # Druid AiPlayerbot.PremadeSpecName.11.0 = balance pve +AiPlayerbot.PremadeSpecGlyph.11.0 = 40916,43331,40921,43335,44922,40919 AiPlayerbot.PremadeSpecLink.11.0.60 = 5012203115331003213302301231 AiPlayerbot.PremadeSpecLink.11.0.80 = 5012203125331103213305301231--205003212 AiPlayerbot.PremadeSpecName.11.1 = bear pve +AiPlayerbot.PremadeSpecGlyph.11.1 = 40897,43331,46372,43335,43332,40899 AiPlayerbot.PremadeSpecLink.11.1.60 = -500232130322110353100301310501 AiPlayerbot.PremadeSpecLink.11.1.80 = -501232130322110353120303313511-20350001 -AiPlayerbot.PremadeSpecGlyph.11.1 = 40897,43331,46372,43335,43332 AiPlayerbot.PremadeSpecName.11.2 = resto pve +AiPlayerbot.PremadeSpecGlyph.11.2 = 40913,43331,40906,43335,44922,45602 AiPlayerbot.PremadeSpecLink.11.2.60 = --230033312031501531050013051 AiPlayerbot.PremadeSpecLink.11.2.80 = 05320001--230033312031512531153313051 AiPlayerbot.PremadeSpecName.11.3 = cat pve +AiPlayerbot.PremadeSpecGlyph.11.3 = 40902,43331,40901,43335,44922,45604 AiPlayerbot.PremadeSpecLink.11.3.60 = -553202032322010052100030310501 AiPlayerbot.PremadeSpecLink.11.3.80 = -553202032322010053100030310511-205503012 diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 30085db8d..d9b3b314b 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -2882,7 +2882,10 @@ void PlayerbotFactory::InitGlyphs(bool increment) if ((proto->AllowableClass & bot->getClassMask()) == 0 || (proto->AllowableRace & bot->getRaceMask()) == 0) continue; - + + if (proto->RequiredLevel > bot->GetLevel()) + continue; + uint32 glyph = 0; for (uint32 spell = 0; spell < MAX_ITEM_PROTO_SPELLS; spell++) { From 44b7615fbeec8091d037119ba084344a68db65d9 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 21:38:36 +0800 Subject: [PATCH 03/14] Mod equip score calculation --- src/PlayerbotFactory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index d9b3b314b..d7f08b00b 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -2885,7 +2885,7 @@ void PlayerbotFactory::InitGlyphs(bool increment) if (proto->RequiredLevel > bot->GetLevel()) continue; - + uint32 glyph = 0; for (uint32 spell = 0; spell < MAX_ITEM_PROTO_SPELLS; spell++) { @@ -3669,12 +3669,12 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot) { case SPELL_AURA_MOD_DAMAGE_DONE: // case SPELL_AURA_MOD_HEALING_DONE: duplicated - spell_power += spellInfo->Effects[i].BasePoints + 1; + spell_power += (spellInfo->Effects[i].BasePoints + 1) * 0.2; break; case SPELL_AURA_MOD_ATTACK_POWER: - attack_power += spellInfo->Effects[i].BasePoints + 1; + attack_power += (spellInfo->Effects[i].BasePoints + 1) * 0.2; case SPELL_AURA_MOD_SHIELD_BLOCKVALUE: - block += spellInfo->Effects[i].BasePoints + 1; + block += (spellInfo->Effects[i].BasePoints + 1) * 0.2; default: break; } From 6b49af345f4ac714bf0eecd7535a9a6f1bbfcf20 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 22:09:18 +0800 Subject: [PATCH 04/14] Gear score --- src/PlayerbotFactory.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index d7f08b00b..88a4d1dcd 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -3750,25 +3750,25 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot) score *= 0.5; } // spec without double hand - // enhancement, rogue, ice dk, shield tank, fury warrior without titan's grip but with duel wield + // enhancement, rogue, ice dk, unholy dk, shield tank, fury warrior without titan's grip but with duel wield if (isDoubleHand && - ((cls == CLASS_SHAMAN && tab == 1 && bot->HasSpell(674)) || + ((cls == CLASS_SHAMAN && tab == 1 && bot->CanDualWield()) || (cls == CLASS_ROGUE) || - (cls == CLASS_DEATH_KNIGHT && tab == 1) || - (cls == CLASS_WARRIOR && tab == 1 && !bot->HasAura(49152) && bot->HasSpell(674)) || + (cls == CLASS_DEATH_KNIGHT && tab != 0) || + (cls == CLASS_WARRIOR && tab == 1 && !bot->CanTitanGrip() && bot->CanDualWield()) || IsShieldTank(bot))) { score *= 0.1; } // spec with double hand // fury with titan's grip, fury without duel wield, arms, bear, retribution, blood dk if (isDoubleHand && - ((cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && bot->HasAura(49152)) || - (cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && !bot->HasSpell(674)) || + ((cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && bot->CanTitanGrip()) || + (cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && !bot->CanDualWield()) || (cls == CLASS_WARRIOR && tab == WARRIOR_TAB_ARMS) || (cls == CLASS_DRUID && tab == 1) || (cls == CLASS_PALADIN && tab == 2) || (cls == CLASS_DEATH_KNIGHT && tab == 0) || - (cls == CLASS_SHAMAN && tab == 1 && !bot->HasSpell(674)))) { + (cls == CLASS_SHAMAN && tab == 1 && !bot->CanDualWield()))) { score *= 10; } } @@ -3780,6 +3780,9 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot) score *= 0.1; } } + if (proto->ItemSet != 0) { + score *= 1.1; + } return (0.0001 + score) * itemLevel * (quality + 1); } From a9c3236e35ca47bd9c6a6068e4784625c632b2fd Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 22:09:26 +0800 Subject: [PATCH 05/14] Unholy DK --- src/strategy/deathknight/DKActions.h | 4 +-- .../deathknight/DKAiObjectContext.cpp | 3 ++- src/strategy/deathknight/DKTriggers.cpp | 5 ++++ src/strategy/deathknight/DKTriggers.h | 7 +++++ src/strategy/deathknight/UnholyDKStrategy.cpp | 26 ++++++++++--------- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/strategy/deathknight/DKActions.h b/src/strategy/deathknight/DKActions.h index 2c6d384b8..e4907ac8f 100644 --- a/src/strategy/deathknight/DKActions.h +++ b/src/strategy/deathknight/DKActions.h @@ -224,10 +224,10 @@ class CastDeathCoilAction : public CastSpellAction CastDeathCoilAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death coil") { } }; -class CastBloodBoilAction : public CastBuffSpellAction +class CastBloodBoilAction : public CastSpellAction { public: - CastBloodBoilAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blood boil") { } + CastBloodBoilAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "blood boil") { } }; class CastDeathAndDecayAction : public CastSpellAction diff --git a/src/strategy/deathknight/DKAiObjectContext.cpp b/src/strategy/deathknight/DKAiObjectContext.cpp index b01d8a6d7..83682fa63 100644 --- a/src/strategy/deathknight/DKAiObjectContext.cpp +++ b/src/strategy/deathknight/DKAiObjectContext.cpp @@ -87,6 +87,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext creators["unbreakable armor"] = &DeathKnightTriggerFactoryInternal::unbreakable_armor; creators["high blood rune"] = &DeathKnightTriggerFactoryInternal::high_blood_rune; creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog; + creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation; } private: @@ -110,7 +111,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext static Trigger* unbreakable_armor(PlayerbotAI* botAI) { return new UnbreakableArmorTrigger(botAI); } static Trigger* high_blood_rune(PlayerbotAI* botAI) { return new HighBloodRuneTrigger(botAI); } static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); } - + static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); } }; class DeathKnightAiObjectContextInternal : public NamedObjectContext diff --git a/src/strategy/deathknight/DKTriggers.cpp b/src/strategy/deathknight/DKTriggers.cpp index 07cf2364b..12b05a3f0 100644 --- a/src/strategy/deathknight/DKTriggers.cpp +++ b/src/strategy/deathknight/DKTriggers.cpp @@ -3,6 +3,7 @@ */ #include "DKTriggers.h" +#include "GenericTriggers.h" #include "Playerbots.h" #include "SharedDefines.h" #include @@ -32,4 +33,8 @@ bool PestilenceTrigger::IsActive() { bool HighBloodRuneTrigger::IsActive() { // bot->Say(std::to_string(bot->GetBaseRune(0)) + "_" + std::to_string(bot->GetRuneCooldown(0)) + " " + std::to_string(bot->GetBaseRune(1)) + "_" + std::to_string(bot->GetRuneCooldown(1)), LANG_UNIVERSAL); return !bot->GetRuneCooldown(0) && !bot->GetRuneCooldown(1); +} + +bool DesolationTrigger::IsActive() { + return bot->HasAura(66817) && HasAuraTrigger::IsActive(); } \ No newline at end of file diff --git a/src/strategy/deathknight/DKTriggers.h b/src/strategy/deathknight/DKTriggers.h index bcf138b7f..f615053c7 100644 --- a/src/strategy/deathknight/DKTriggers.h +++ b/src/strategy/deathknight/DKTriggers.h @@ -139,4 +139,11 @@ class FreezingFogTrigger : public HasAuraTrigger FreezingFogTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "freezing fog") { } }; +class DesolationTrigger : public HasAuraTrigger +{ + public: + DesolationTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "desolation") { } + bool IsActive() override; +}; + #endif diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp index 638a9967f..ad3d030a1 100644 --- a/src/strategy/deathknight/UnholyDKStrategy.cpp +++ b/src/strategy/deathknight/UnholyDKStrategy.cpp @@ -34,7 +34,7 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("death strike", - /*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr), + /*P*/ NextAction::array(0, new NextAction("unholy presence"), nullptr), /*A*/ nullptr, /*C*/ nullptr); } @@ -42,7 +42,7 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("corpse explosion", - /*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr), + /*P*/ NextAction::array(0, new NextAction("unholy presence"), nullptr), /*A*/ nullptr, /*C*/ nullptr); } @@ -50,14 +50,14 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory static ActionNode* scourge_strike([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("scourge strike", - /*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr), + /*P*/ NextAction::array(0, new NextAction("unholy presence"), nullptr), /*A*/ nullptr, /*C*/ nullptr); } static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("icy touch", - /*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr), + /*P*/ NextAction::array(0, new NextAction("unholy presence"), nullptr), /*A*/ nullptr, /*C*/ nullptr); } @@ -72,13 +72,14 @@ UnholyDKStrategy::UnholyDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI NextAction** UnholyDKStrategy::getDefaultActions() { return NextAction::array(0, - new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), - new NextAction("blood strike", ACTION_DEFAULT + 0.7f), - new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.6f), - new NextAction("summon gargoyle", ACTION_DEFAULT + 0.5f), - new NextAction("death coil", ACTION_DEFAULT + 0.4f), - new NextAction("plague strike", ACTION_DEFAULT + 0.3f), - new NextAction("icy touch", ACTION_DEFAULT + 0.2f), + // new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), + new NextAction("death and decay", ACTION_DEFAULT + 0.8), + new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.7f), + new NextAction("blood boil", ACTION_DEFAULT + 0.6f), + new NextAction("icy touch", ACTION_DEFAULT + 0.5f), + new NextAction("plague strike", ACTION_DEFAULT + 0.4f), + new NextAction("summon gargoyle", ACTION_DEFAULT + 0.3f), + new NextAction("death coil", ACTION_DEFAULT + 0.2f), new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), nullptr); @@ -89,7 +90,8 @@ void UnholyDKStrategy::InitTriggers(std::vector& triggers) GenericDKStrategy::InitTriggers(triggers); // triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr))); - triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_EMERGENCY + 1), nullptr))); + triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr))); + triggers.push_back(new TriggerNode("no desolation", NextAction::array(0, new NextAction("blood strike", ACTION_HIGH + 4), nullptr))); } void UnholyDKAoeStrategy::InitTriggers(std::vector& triggers) From 65ad88154b4ebe47d6eb823e3836eff3fdb0f729 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 23:10:52 +0800 Subject: [PATCH 06/14] Unholy DK --- conf/playerbots.conf.dist | 6 +++--- src/strategy/deathknight/DKAiObjectContext.cpp | 4 ++-- src/strategy/deathknight/DKTriggers.cpp | 2 +- src/strategy/deathknight/DKTriggers.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index f66b6ba97..b57e730f4 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -560,9 +560,9 @@ AiPlayerbot.PremadeSpecGlyph.6.1 = 45805,43673,43547,43544,43672,43543 AiPlayerbot.PremadeSpecLink.6.1.60 = -32003350332203012300023101351 AiPlayerbot.PremadeSpecLink.6.1.80 = -32002350352203012300033101351-230200305003 AiPlayerbot.PremadeSpecName.6.2 = unholy pve -AiPlayerbot.PremadeSpecGlyph.6.2 = 43546,43673,45804,43544,43672,43549 -AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303330032152000150013130151 -AiPlayerbot.PremadeSpecLink.6.2.80 = -320050500002-2300303330032152000150013133151 +AiPlayerbot.PremadeSpecGlyph.6.2 = 43542,43673,45804,43544,43672,43549 +AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303340032152000150013130051 +AiPlayerbot.PremadeSpecLink.6.2.80 = -320053500001-2300303350032152000150013130051 AiPlayerbot.PremadeSpecName.6.3 = double aura blood pve AiPlayerbot.PremadeSpecGlyph.6.3 = 45805,43673,43827,43544,43672,43554 AiPlayerbot.PremadeSpecLink.6.3.60 = 005512153330030320102013-305 diff --git a/src/strategy/deathknight/DKAiObjectContext.cpp b/src/strategy/deathknight/DKAiObjectContext.cpp index 83682fa63..90e738ca6 100644 --- a/src/strategy/deathknight/DKAiObjectContext.cpp +++ b/src/strategy/deathknight/DKAiObjectContext.cpp @@ -129,7 +129,7 @@ class DeathKnightAiObjectContextInternal : public NamedObjectContext creators["unholy blight"] = &DeathKnightAiObjectContextInternal::unholy_blight; creators["scourge strike"] = &DeathKnightAiObjectContextInternal::scourge_strike; creators["death and decay"] = &DeathKnightAiObjectContextInternal::death_and_decay; - creators["unholy pressence"] = &DeathKnightAiObjectContextInternal::unholy_pressence; + creators["unholy presence"] = &DeathKnightAiObjectContextInternal::unholy_presence; creators["raise dead"] = &DeathKnightAiObjectContextInternal::raise_dead; creators["army of the dead"] = &DeathKnightAiObjectContextInternal::army_of_the_dead; creators["summon gargoyle"] = &DeathKnightAiObjectContextInternal::summon_gargoyle; @@ -186,7 +186,7 @@ class DeathKnightAiObjectContextInternal : public NamedObjectContext static Action* unholy_blight(PlayerbotAI* botAI) { return new CastUnholyBlightAction(botAI); } static Action* scourge_strike(PlayerbotAI* botAI) { return new CastScourgeStrikeAction(botAI); } static Action* death_and_decay(PlayerbotAI* botAI) { return new CastDeathAndDecayAction(botAI); } - static Action* unholy_pressence(PlayerbotAI* botAI) { return new CastUnholyPresenceAction(botAI); } + static Action* unholy_presence(PlayerbotAI* botAI) { return new CastUnholyPresenceAction(botAI); } static Action* raise_dead(PlayerbotAI* botAI) { return new CastRaiseDeadAction(botAI); } static Action* army_of_the_dead(PlayerbotAI* botAI) { return new CastArmyOfTheDeadAction(botAI); } static Action* summon_gargoyle(PlayerbotAI* botAI) { return new CastSummonGargoyleAction(botAI); } diff --git a/src/strategy/deathknight/DKTriggers.cpp b/src/strategy/deathknight/DKTriggers.cpp index 12b05a3f0..84d6350a4 100644 --- a/src/strategy/deathknight/DKTriggers.cpp +++ b/src/strategy/deathknight/DKTriggers.cpp @@ -36,5 +36,5 @@ bool HighBloodRuneTrigger::IsActive() { } bool DesolationTrigger::IsActive() { - return bot->HasAura(66817) && HasAuraTrigger::IsActive(); + return bot->HasAura(66817) && !botAI->HasAura("desolation", GetTarget(), false, true, -1, true); } \ No newline at end of file diff --git a/src/strategy/deathknight/DKTriggers.h b/src/strategy/deathknight/DKTriggers.h index f615053c7..515f8358e 100644 --- a/src/strategy/deathknight/DKTriggers.h +++ b/src/strategy/deathknight/DKTriggers.h @@ -139,10 +139,10 @@ class FreezingFogTrigger : public HasAuraTrigger FreezingFogTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "freezing fog") { } }; -class DesolationTrigger : public HasAuraTrigger +class DesolationTrigger : public BuffTrigger { public: - DesolationTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "desolation") { } + DesolationTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "desolation") { } bool IsActive() override; }; From e11ea57dde611dbdd58a9eee108068ebcfae6d0b Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 23:30:15 +0800 Subject: [PATCH 07/14] DK death and decay --- src/strategy/deathknight/GenericDKStrategy.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/strategy/deathknight/GenericDKStrategy.cpp b/src/strategy/deathknight/GenericDKStrategy.cpp index 241816eb7..42c4ffa42 100644 --- a/src/strategy/deathknight/GenericDKStrategy.cpp +++ b/src/strategy/deathknight/GenericDKStrategy.cpp @@ -33,7 +33,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory //creators["improved icy talons"] = &improved_icy_talons; boost party //unholy - //creators["death and decay"] = &death_and_decay; + creators["death and decay"] = &death_and_decay; //creators["raise dead"] = &raise_dead; //creators["army of the dead"] = &army of the dead; //creators["summon gargoyle"] = &army of the dead; @@ -130,6 +130,14 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory /*C*/ nullptr); } + static ActionNode* death_and_decay([[maybe_unused]] PlayerbotAI* botAI) + { + return new ActionNode ("death and decay", + /*P*/ nullptr, + /*A*/ NextAction::array(0, new NextAction("blood tap"), nullptr), + /*C*/ nullptr); + } + static ActionNode* anti_magic_zone([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode ("anti magic zone", From c9373d02af9852f679481c46ef2f08338c5af852 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 8 Apr 2024 23:41:14 +0800 Subject: [PATCH 08/14] Unholy pve spec --- conf/playerbots.conf.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index b57e730f4..787dc5c56 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -561,8 +561,8 @@ AiPlayerbot.PremadeSpecLink.6.1.60 = -32003350332203012300023101351 AiPlayerbot.PremadeSpecLink.6.1.80 = -32002350352203012300033101351-230200305003 AiPlayerbot.PremadeSpecName.6.2 = unholy pve AiPlayerbot.PremadeSpecGlyph.6.2 = 43542,43673,45804,43544,43672,43549 -AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303340032152000150013130051 -AiPlayerbot.PremadeSpecLink.6.2.80 = -320053500001-2300303350032152000150013130051 +AiPlayerbot.PremadeSpecLink.6.2.60 = --2300303050032152000150213130051 +AiPlayerbot.PremadeSpecLink.6.2.80 = -320053500002-2300303050032152000150213130051 AiPlayerbot.PremadeSpecName.6.3 = double aura blood pve AiPlayerbot.PremadeSpecGlyph.6.3 = 45805,43673,43827,43544,43672,43554 AiPlayerbot.PremadeSpecLink.6.3.60 = 005512153330030320102013-305 From 4db0e30dd35f62ddb427cf0f570d9e0b69770fa0 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 9 Apr 2024 23:24:08 +0800 Subject: [PATCH 09/14] Unholy spell order --- src/strategy/deathknight/UnholyDKStrategy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp index ad3d030a1..f6d835fa8 100644 --- a/src/strategy/deathknight/UnholyDKStrategy.cpp +++ b/src/strategy/deathknight/UnholyDKStrategy.cpp @@ -75,12 +75,12 @@ NextAction** UnholyDKStrategy::getDefaultActions() // new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), new NextAction("death and decay", ACTION_DEFAULT + 0.8), new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.7f), - new NextAction("blood boil", ACTION_DEFAULT + 0.6f), new NextAction("icy touch", ACTION_DEFAULT + 0.5f), + new NextAction("blood boil", ACTION_DEFAULT + 0.6f), new NextAction("plague strike", ACTION_DEFAULT + 0.4f), + new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), new NextAction("summon gargoyle", ACTION_DEFAULT + 0.3f), new NextAction("death coil", ACTION_DEFAULT + 0.2f), - new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), nullptr); } From d01953d2e0a7ce74692fef052e3b45911d644cda Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 9 Apr 2024 23:25:07 +0800 Subject: [PATCH 10/14] Unholy spell order --- src/strategy/deathknight/UnholyDKStrategy.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp index f6d835fa8..647df2347 100644 --- a/src/strategy/deathknight/UnholyDKStrategy.cpp +++ b/src/strategy/deathknight/UnholyDKStrategy.cpp @@ -73,14 +73,15 @@ NextAction** UnholyDKStrategy::getDefaultActions() { return NextAction::array(0, // new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), - new NextAction("death and decay", ACTION_DEFAULT + 0.8), - new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.7f), - new NextAction("icy touch", ACTION_DEFAULT + 0.5f), + new NextAction("death and decay", ACTION_DEFAULT + 0.9f), + new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.8f), + new NextAction("icy touch", ACTION_DEFAULT + 0.7f), new NextAction("blood boil", ACTION_DEFAULT + 0.6f), + new NextAction("blood strike", ACTION_DEFAULT + 0.5f), new NextAction("plague strike", ACTION_DEFAULT + 0.4f), - new NextAction("horn of winter", ACTION_DEFAULT + 0.1f), - new NextAction("summon gargoyle", ACTION_DEFAULT + 0.3f), - new NextAction("death coil", ACTION_DEFAULT + 0.2f), + new NextAction("horn of winter", ACTION_DEFAULT + 0.3f), + new NextAction("summon gargoyle", ACTION_DEFAULT + 0.2f), + new NextAction("death coil", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), nullptr); } From 9eb9fd3a7d7d8a2500042c4b66f89d9d6eca2c2c Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 10 Apr 2024 19:10:47 +0800 Subject: [PATCH 11/14] Unholy DK --- .../deathknight/DKAiObjectContext.cpp | 3 +++ src/strategy/deathknight/DKTriggers.cpp | 8 +++++++ src/strategy/deathknight/DKTriggers.h | 7 ++++++ src/strategy/deathknight/UnholyDKStrategy.cpp | 23 +++++++++++-------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/strategy/deathknight/DKAiObjectContext.cpp b/src/strategy/deathknight/DKAiObjectContext.cpp index 90e738ca6..bc260c2d5 100644 --- a/src/strategy/deathknight/DKAiObjectContext.cpp +++ b/src/strategy/deathknight/DKAiObjectContext.cpp @@ -88,6 +88,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext creators["high blood rune"] = &DeathKnightTriggerFactoryInternal::high_blood_rune; creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog; creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation; + creators["death and decay cooldown"] = &DeathKnightTriggerFactoryInternal::death_and_decay_cooldown; } private: @@ -112,6 +113,8 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext static Trigger* high_blood_rune(PlayerbotAI* botAI) { return new HighBloodRuneTrigger(botAI); } static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); } static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); } + static Trigger* death_and_decay_cooldown(PlayerbotAI* botAI) { return new DeathAndDecayCooldownTrigger(botAI); } + }; class DeathKnightAiObjectContextInternal : public NamedObjectContext diff --git a/src/strategy/deathknight/DKTriggers.cpp b/src/strategy/deathknight/DKTriggers.cpp index 84d6350a4..8eee1045e 100644 --- a/src/strategy/deathknight/DKTriggers.cpp +++ b/src/strategy/deathknight/DKTriggers.cpp @@ -37,4 +37,12 @@ bool HighBloodRuneTrigger::IsActive() { bool DesolationTrigger::IsActive() { return bot->HasAura(66817) && !botAI->HasAura("desolation", GetTarget(), false, true, -1, true); +} + +bool DeathAndDecayCooldownTrigger::IsActive() { + uint32 spellId = AI_VALUE2(uint32, "spell id", name); + if (!spellId) + return true; + + return bot->HasSpellCooldown(spellId); } \ No newline at end of file diff --git a/src/strategy/deathknight/DKTriggers.h b/src/strategy/deathknight/DKTriggers.h index 515f8358e..8edc6bf40 100644 --- a/src/strategy/deathknight/DKTriggers.h +++ b/src/strategy/deathknight/DKTriggers.h @@ -146,4 +146,11 @@ class DesolationTrigger : public BuffTrigger bool IsActive() override; }; +class DeathAndDecayCooldownTrigger : public SpellCooldownTrigger +{ + public: + DeathAndDecayCooldownTrigger(PlayerbotAI* botAI) : SpellCooldownTrigger(botAI, "death and decay") { } + bool IsActive() override; +}; + #endif diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp index 647df2347..7fff5fba3 100644 --- a/src/strategy/deathknight/UnholyDKStrategy.cpp +++ b/src/strategy/deathknight/UnholyDKStrategy.cpp @@ -72,16 +72,11 @@ UnholyDKStrategy::UnholyDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI NextAction** UnholyDKStrategy::getDefaultActions() { return NextAction::array(0, - // new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), - new NextAction("death and decay", ACTION_DEFAULT + 0.9f), - new NextAction("ghoul frenzy", ACTION_DEFAULT + 0.8f), - new NextAction("icy touch", ACTION_DEFAULT + 0.7f), - new NextAction("blood boil", ACTION_DEFAULT + 0.6f), - new NextAction("blood strike", ACTION_DEFAULT + 0.5f), - new NextAction("plague strike", ACTION_DEFAULT + 0.4f), - new NextAction("horn of winter", ACTION_DEFAULT + 0.3f), - new NextAction("summon gargoyle", ACTION_DEFAULT + 0.2f), - new NextAction("death coil", ACTION_DEFAULT + 0.1f), + new NextAction("death and decay", ACTION_DEFAULT + 1.0f), + new NextAction("scourge strike", ACTION_DEFAULT + 0.8f), + new NextAction("horn of winter", ACTION_DEFAULT + 0.6f), + new NextAction("summon gargoyle", ACTION_DEFAULT + 0.4f), + new NextAction("death coil", ACTION_DEFAULT + 0.2f), new NextAction("melee", ACTION_DEFAULT), nullptr); } @@ -93,6 +88,14 @@ void UnholyDKStrategy::InitTriggers(std::vector& triggers) // triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr))); triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode("no desolation", NextAction::array(0, new NextAction("blood strike", ACTION_HIGH + 4), nullptr))); + triggers.push_back(new TriggerNode("death and decay cooldown", + NextAction::array(0, + new NextAction("ghoul frenzy", ACTION_DEFAULT + 5.0f), + new NextAction("scourge strike", ACTION_DEFAULT + 4.0f), + new NextAction("blood boil", ACTION_NORMAL + 3.0f), + new NextAction("icy touch", ACTION_NORMAL + 2.0f), + new NextAction("plague strike", ACTION_NORMAL + 1.0f), + nullptr))); } void UnholyDKAoeStrategy::InitTriggers(std::vector& triggers) From 17ddf6fbc5523fd716f3af74d3d5d6247e998d8f Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 10 Apr 2024 19:14:23 +0800 Subject: [PATCH 12/14] Warlock destro pve --- conf/playerbots.conf.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 787dc5c56..18ff5b1b7 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -609,7 +609,7 @@ AiPlayerbot.PremadeSpecLink.9.1.70 = -003203301135112530135201051-55 AiPlayerbot.PremadeSpecLink.9.1.80 = -003203301135112530135221351-55000005 AiPlayerbot.PremadeSpecName.9.2 = destro pve AiPlayerbot.PremadeSpecGlyph.9.2 = 45785,43390,50077,43394,43393,42454 -AiPlayerbot.PremadeSpecLink.9.2.60 = --05203205210131051313230351 +AiPlayerbot.PremadeSpecLink.9.2.60 = --05203205210131051313230341 AiPlayerbot.PremadeSpecLink.9.2.80 = -03310030003-05203205210331051335230351 # Druid From 00a3436d7746cd4d5ed89fc268c92554236e5824 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 10 Apr 2024 20:32:43 +0800 Subject: [PATCH 13/14] Army of the dead --- src/strategy/deathknight/BloodDKStrategy.cpp | 6 +++--- src/strategy/deathknight/DKAiObjectContext.cpp | 3 ++- src/strategy/deathknight/DKTriggers.h | 6 ++++++ src/strategy/deathknight/FrostDKStrategy.cpp | 1 + src/strategy/deathknight/UnholyDKStrategy.cpp | 1 + src/strategy/paladin/DpsPaladinStrategy.cpp | 4 ++-- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/strategy/deathknight/BloodDKStrategy.cpp b/src/strategy/deathknight/BloodDKStrategy.cpp index b63908cb0..f3d20f735 100644 --- a/src/strategy/deathknight/BloodDKStrategy.cpp +++ b/src/strategy/deathknight/BloodDKStrategy.cpp @@ -99,7 +99,7 @@ void BloodDKStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("rune strike", NextAction::array(0, new NextAction("rune strike", ACTION_NORMAL + 3), nullptr))); triggers.push_back(new TriggerNode("blood tap", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("dark command", ACTION_HIGH + 3), nullptr))); - triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5), - new NextAction("vampiric blood", ACTION_HIGH + 3), new NextAction("death strike", ACTION_HIGH + 4), nullptr))); - + triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 5), + new NextAction("vampiric blood", ACTION_HIGH + 4), new NextAction("death strike", ACTION_HIGH + 3), nullptr))); + // triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr))); } diff --git a/src/strategy/deathknight/DKAiObjectContext.cpp b/src/strategy/deathknight/DKAiObjectContext.cpp index bc260c2d5..99883cbca 100644 --- a/src/strategy/deathknight/DKAiObjectContext.cpp +++ b/src/strategy/deathknight/DKAiObjectContext.cpp @@ -89,6 +89,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog; creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation; creators["death and decay cooldown"] = &DeathKnightTriggerFactoryInternal::death_and_decay_cooldown; + creators["army of the dead"] = &DeathKnightTriggerFactoryInternal::army_of_the_dead; } private: @@ -114,7 +115,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); } static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); } static Trigger* death_and_decay_cooldown(PlayerbotAI* botAI) { return new DeathAndDecayCooldownTrigger(botAI); } - + static Trigger* army_of_the_dead(PlayerbotAI* botAI) { return new ArmyOfTheDeadTrigger(botAI); } }; class DeathKnightAiObjectContextInternal : public NamedObjectContext diff --git a/src/strategy/deathknight/DKTriggers.h b/src/strategy/deathknight/DKTriggers.h index 8edc6bf40..08b91a826 100644 --- a/src/strategy/deathknight/DKTriggers.h +++ b/src/strategy/deathknight/DKTriggers.h @@ -153,4 +153,10 @@ class DeathAndDecayCooldownTrigger : public SpellCooldownTrigger bool IsActive() override; }; +class ArmyOfTheDeadTrigger : public BoostTrigger +{ + public: + ArmyOfTheDeadTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "army of the dead") { } +}; + #endif diff --git a/src/strategy/deathknight/FrostDKStrategy.cpp b/src/strategy/deathknight/FrostDKStrategy.cpp index 8feba4136..fd886226a 100644 --- a/src/strategy/deathknight/FrostDKStrategy.cpp +++ b/src/strategy/deathknight/FrostDKStrategy.cpp @@ -91,6 +91,7 @@ NextAction** FrostDKStrategy::getDefaultActions() void FrostDKStrategy::InitTriggers(std::vector& triggers) { GenericDKStrategy::InitTriggers(triggers); + triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr))); triggers.push_back(new TriggerNode("unbreakable armor", NextAction::array(0, new NextAction("unbreakable armor", ACTION_NORMAL + 4), nullptr))); triggers.push_back(new TriggerNode("high blood rune", NextAction::array(0, new NextAction("blood strike", ACTION_NORMAL + 1), nullptr))); triggers.push_back(new TriggerNode("freezing fog", NextAction::array(0, new NextAction("howling blast", ACTION_HIGH + 1), nullptr))); diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp index 7fff5fba3..5bc5f500f 100644 --- a/src/strategy/deathknight/UnholyDKStrategy.cpp +++ b/src/strategy/deathknight/UnholyDKStrategy.cpp @@ -86,6 +86,7 @@ void UnholyDKStrategy::InitTriggers(std::vector& triggers) GenericDKStrategy::InitTriggers(triggers); // triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr))); + triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr))); triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode("no desolation", NextAction::array(0, new NextAction("blood strike", ACTION_HIGH + 4), nullptr))); triggers.push_back(new TriggerNode("death and decay cooldown", diff --git a/src/strategy/paladin/DpsPaladinStrategy.cpp b/src/strategy/paladin/DpsPaladinStrategy.cpp index 4b2d7b06c..1fe8ae1a6 100644 --- a/src/strategy/paladin/DpsPaladinStrategy.cpp +++ b/src/strategy/paladin/DpsPaladinStrategy.cpp @@ -81,8 +81,8 @@ DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrat NextAction** DpsPaladinStrategy::getDefaultActions() { return NextAction::array(0, - new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.4f), - new NextAction("crusader strike", ACTION_DEFAULT + 0.3f), + new NextAction("crusader strike", ACTION_DEFAULT + 0.4f), + new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.3f), new NextAction("divine storm", ACTION_DEFAULT + 0.2f), new NextAction("melee consecration", ACTION_DEFAULT + 0.1f), new NextAction("melee", ACTION_DEFAULT), From 7cd74da2014ab3802d48df5d5fed812e8851318e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 10 Apr 2024 23:40:46 +0800 Subject: [PATCH 14/14] Better performance --- src/PlayerbotAI.cpp | 2 +- src/strategy/actions/MovementActions.cpp | 2 +- src/strategy/actions/MovementActions.h | 2 +- src/strategy/values/EnemyPlayerValue.h | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 0c4ce732a..7bda537c5 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -1388,7 +1388,7 @@ bool PlayerbotAI::IsCombo(Player* player) { int tab = AiFactory::GetPlayerSpecTab(player); return player->getClass() == CLASS_ROGUE || - (player->getClass() == CLASS_DRUID && tab == DRUID_TAB_FERAL && !IsTank(bot)); + (player->getClass() == CLASS_DRUID && player->HasAura(768)); // cat druid } bool PlayerbotAI::IsRangedDps(Player* player) diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index 6d0ba2dd9..926dcb3fd 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -151,7 +151,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, // } bool generatePath = !bot->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !bot->IsFlying() && !bot->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING) && !bot->IsInWater(); - float modifiedZ = SearchBestGroundZForPath(x, y, z, generatePath, 20.0f, normal_only); + float modifiedZ = SearchBestGroundZForPath(x, y, z, generatePath, 20.0f, normal_only, 8.0f); if (modifiedZ == INVALID_HEIGHT) { return false; } diff --git a/src/strategy/actions/MovementActions.h b/src/strategy/actions/MovementActions.h index 722a941c4..bff7ff3a3 100644 --- a/src/strategy/actions/MovementActions.h +++ b/src/strategy/actions/MovementActions.h @@ -42,7 +42,7 @@ class MovementAction : public Action bool MoveInside(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->followDistance); void CreateWp(Player* wpOwner, float x, float y, float z, float o, uint32 entry, bool important = false); private: - float SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range = 15.0f, bool normal_only = false, float step = 3.0f); + float SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range = 20.0f, bool normal_only = false, float step = 8.0f); }; class FleeAction : public MovementAction diff --git a/src/strategy/values/EnemyPlayerValue.h b/src/strategy/values/EnemyPlayerValue.h index 058d7db87..d3be32f0e 100644 --- a/src/strategy/values/EnemyPlayerValue.h +++ b/src/strategy/values/EnemyPlayerValue.h @@ -5,6 +5,7 @@ #ifndef _PLAYERBOT_ENEMYPLAYERVALUE_H #define _PLAYERBOT_ENEMYPLAYERVALUE_H +#include "PlayerbotAIConfig.h" #include "TargetValue.h" #include "PossibleTargetsValue.h" @@ -14,7 +15,7 @@ class Unit; class NearestEnemyPlayersValue : public PossibleTargetsValue { public: - NearestEnemyPlayersValue(PlayerbotAI* botAI, float range = 120.0f) : + NearestEnemyPlayersValue(PlayerbotAI* botAI, float range = sPlayerbotAIConfig->grindDistance) : PossibleTargetsValue(botAI, "nearest enemy players", range) { } public: