Files
Viano-Core/src/server/game/World/AdventureTalentPolicy.h
T
Nico a758239da9
clang PCH / build (push) Canceled after 0s
GCC PCH / build (push) Canceled after 0s
Implement AdventureBot class rotations, group roles and instance encounters
2026-10-28 22:37:18 +01:00

59 lines
6.9 KiB
C++

#ifndef VCORE_ADVENTURE_TALENT_POLICY_H
#define VCORE_ADVENTURE_TALENT_POLICY_H
#include <vector>
#include <cstdint>
namespace AdventureTalentPolicy
{
struct Talent {uint32_t Id;unsigned Ranks;};
// Cataclysm PvE templates, checked against the local 4.3.4 Talent.dbc.
// Source URLs and retrieval date: doc/clientless/class-combat.md.
template<class Learn,class Remaining>
bool Spend(std::vector<Talent> const& build,Learn learn,Remaining remaining)
{
for(unsigned pass=0;pass<50 && remaining();++pass)
{
bool progress=false;
for(auto const& talent:build)
for(unsigned rank=0;rank<talent.Ranks && remaining();++rank)
if(learn(talent.Id,rank))progress=true;
if(!progress)break;
}
return !remaining();
}
inline std::vector<Talent> Build(unsigned klass,unsigned spec,bool tank=false)
{
switch(klass*10+spec)
{
case 10: return {{9664,2},{10134,3},{8176,3},{8184,1},{11416,2},{8192,1},{10138,3},{10741,2},{9662,2},{11223,1},{11418,2},{8208,1},{8214,2},{10520,3},{8194,2},{8222,1},{9606,3},{9608,2},{9644,2},{10464,1},{10480,2}};
case 11: return {{9606,3},{9608,2},{9624,2},{9644,2},{11415,2},{9612,3},{9630,1},{9636,3},{9648,1},{9650,1},{11208,1},{9642,2},{10743,2},{9654,3},{10744,2},{9658,1},{9664,2},{10134,3},{8176,3},{10464,2}};
case 12: return {{10464,3},{10474,3},{10480,2},{10466,1},{10472,3},{11170,2},{10478,1},{10482,1},{10494,1},{10934,2},{10470,2},{10486,1},{10484,2},{10488,2},{10492,1},{10496,3},{10498,1},{10134,3},{11163,2},{8176,3},{9608,2}};
case 20: return {{10127,3},{12189,3},{10097,1},{11213,3},{10129,2},{11202,1},{11771,2},{10113,1},{10121,1},{10133,1},{11215,3},{10115,1},{11779,3},{12151,2},{11168,3},{11203,1},{12198,3},{10651,3},{11612,2},{11611,2}};
case 21: return {{10324,2},{12198,3},{10332,3},{10372,2},{10344,2},{10346,3},{10374,1},{11159,2},{11161,2},{11193,2},{11607,1},{10334,1},{10356,1},{10680,1},{10340,3},{10370,2},{10350,1},{10651,3},{11612,2},{11269,2},{11611,2}};
case 22: return {{10647,2},{10651,3},{11612,2},{11269,3},{11611,2},{10661,3},{10665,1},{11204,1},{11610,2},{10643,1},{10669,3},{11207,1},{11372,1},{10633,2},{10677,3},{11211,1},{11222,1},{10099,2},{10127,3},{11780,2},{10324,2}};
case 31: return {{9380,3},{9390,2},{9396,2},{9398,2},{9402,3},{11225,3},{9408,2},{9412,1},{9416,2},{9404,1},{9418,3},{9422,2},{9426,2},{9428,2},{9430,1},{9490,3},{9492,2},{9512,2},{9432,3}};
case 32: return {{9432,3},{9450,2},{9444,2},{10753,3},{9452,2},{9484,3},{9460,3},{9462,2},{9464,2},{9468,1},{9474,2},{9476,1},{9478,3},{11698,1},{9480,1},{9490,3},{9380,3},{9390,2},{9396,2}};
case 40: return {{269,3},{276,3},{273,3},{277,3},{1721,2},{280,1},{682,3},{283,2},{11209,1},{281,1},{1715,1},{6516,2},{2070,3},{6517,2},{2071,1},{181,2},{244,2},{2244,3},{261,3}};
case 41: return {{181,3},{201,3},{6395,2},{1122,3},{1827,2},{186,3},{203,2},{11171,1},{1825,3},{205,1},{2074,2},{6513,2},{11174,3},{2076,1},{269,2},{276,3},{273,2},{2244,3}};
case 50: return {{8577,3},{8595,3},{10736,2},{8593,2},{8607,2},{11608,1},{8591,1},{8611,1},{11224,2},{11812,2},{8617,3},{11523,2},{8609,3},{8623,1},{8625,2},{8603,1},{9549,3},{9553,2},{9561,2},{9032,3}};
case 51: return {{9549,3},{9553,3},{10746,2},{9561,2},{11669,1},{11765,2},{9577,2},{9593,2},{11666,1},{12184,2},{9573,2},{14738,1},{11667,1},{11755,1},{9595,1},{9597,3},{11668,2},{9601,1},{8577,3},{8595,3},{9032,3}};
case 52: return {{9032,3},{9036,2},{9046,2},{9042,3},{9062,2},{11673,2},{9064,1},{11606,2},{9054,1},{9060,2},{11778,2},{9074,1},{9076,2},{9070,3},{11605,2},{9080,1},{8577,3},{8595,3},{8581,1},{8593,2},{11608,1}};
case 60: return {{1938,3},{2017,3},{1948,2},{7462,2},{12223,2},{2105,2},{7458,3},{7459,1},{1936,2},{1960,2},{7461,2},{1941,1},{1959,3},{2019,1},{2259,3},{7463,2},{1961,1},{2031,3},{1963,3}};
case 61: return {{2022,3},{2031,2},{1971,2},{2048,3},{1981,2},{1993,2},{2044,3},{1979,1},{1980,2},{1992,3},{2223,1},{1999,1},{2029,2},{2284,3},{1989,1},{1938,3},{1939,2},{12223,2},{1932,3}};
case 62: return {{1932,3},{1963,3},{2025,1},{11178,3},{2047,2},{7574,1},{11179,3},{12119,2},{2009,2},{2082,3},{1996,1},{2013,2},{2085,1},{2043,2},{7575,3},{2000,1},{1938,3},{1939,2},{12223,2},{2031,1}};
case 70: return {{563,3},{11218,3},{561,2},{575,2},{1685,3},{574,1},{1641,2},{11767,2},{2049,2},{2051,3},{573,1},{5565,1},{11769,1},{5566,2},{11368,3},{607,1},{611,2},{5568,2},{11177,3},{595,2}};
case 71: return {{607,2},{611,2},{5560,3},{602,3},{605,2},{11216,3},{901,1},{2055,3},{2083,3},{1689,2},{1693,1},{2057,3},{5563,2},{2058,1},{563,2},{11218,3},{561,2},{1685,3}};
case 72: return {{593,3},{5568,1},{11177,3},{583,2},{595,2},{5567,3},{581,2},{591,1},{1696,3},{588,2},{2084,1},{590,1},{7705,2},{15487,1},{2063,3},{2064,1},{563,2},{11218,3},{1685,3},{611,2}};
case 80: return {{9154,3},{9200,3},{9170,3},{9172,2},{10737,2},{9174,1},{9178,3},{9192,2},{9198,2},{9188,2},{10733,1},{11825,2},{9180,2},{9196,1},{9194,2},{10578,1},{9186,1},{10531,3},{10545,2},{11157,3}};
case 81: return {{10531,3},{10545,2},{10529,3},{10537,2},{11434,3},{10547,2},{10551,1},{10573,1},{11433,2},{10561,1},{11431,1},{12121,2},{10563,3},{10571,1},{10734,2},{10541,3},{10559,2},{10577,1},{9200,3},{11157,3}};
case 90: return {{11100,2},{11104,3},{11110,2},{11112,2},{11214,2},{11420,2},{11134,3},{11124,3},{11366,1},{11122,2},{11142,3},{11419,1},{11150,3},{11200,2},{11152,1},{10992,3},{10936,3},{10938,3}};
case 91: return {{10992,3},{10994,3},{11206,1},{11014,2},{11020,2},{11190,2},{11713,2},{11198,3},{11024,3},{11201,1},{11034,2},{11188,2},{11189,1},{11042,1},{11199,2},{11044,1},{11104,3},{10936,3},{10960,2},{11181,2}};
case 92: return {{10936,3},{10938,3},{10960,2},{11181,2},{10940,2},{10948,1},{10978,3},{10970,2},{11182,2},{12120,1},{10964,2},{10980,1},{10984,3},{10962,1},{10982,2},{10986,1},{11104,3},{10992,3},{11206,2},{11020,2}};
case 110: return {{8349,3},{8359,3},{11281,2},{8353,2},{8383,2},{11284,3},{8381,2},{8389,2},{11278,1},{11282,1},{8361,1},{8391,3},{8399,1},{11277,1},{12149,2},{12150,1},{8405,1},{11716,1},{8237,2},{11715,3},{8277,1},{11279,3}};
case 111: if(tank)return {{8295,2},{11716,3},{8305,3},{8761,2},{11285,2},{8293,3},{8299,1},{8301,2},{8323,3},{8325,1},{8313,1},{8758,2},{8759,2},{8319,1},{8343,3},{8347,1},{8237,2},{11715,3},{8277,1},{11279,3}}; return {{8295,2},{9026,2},{11716,3},{8305,3},{8761,2},{11285,2},{8299,1},{8301,2},{8323,3},{8303,1},{8307,2},{8325,1},{8313,1},{8335,2},{8759,2},{8341,2},{8343,3},{8347,1},{8237,2},{11715,3},{8277,1}};
case 112: return {{8227,2},{8237,2},{11699,2},{11715,3},{8245,3},{8277,1},{8249,1},{8269,2},{8255,1},{8762,2},{12146,2},{8263,3},{8279,1},{8763,1},{8265,1},{11280,3},{8271,1},{8359,3},{11281,2},{8353,2},{11284,3}};
default:return {};
}
}
}
#endif