Code:
#include "StdAfx.h"
#include "Setup.h"
extern "C" SCRIPT_DECL uint32 _exp_get_version()
{
return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
}
extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
{
return SCRIPT_TYPE_MISC;
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD, (void *)&OnFirstEnterWorld);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
void OnFirstEnterWorld(Player * plr)
{
doLevel70(plr);
doLearnSpells(plr);
//doLearnSkills(plr);
}
void doLevel70(Player * plr)
{
uint32 Level = 70;
LevelInfo * Info = objmgr.GetLevelInfo(plr->getRace(), plr->getClass(), Level);
plr->ApplyLevelInfo(Info, Level);
}
void doLearnSpells(Player * plr)
{
static uint32 spellarray[DRUID+1][9999] = {
// Class 0
{ 0 },
// CLASS 1
{
6673,2457,78,100,772,6343,1715,284,2687,71,6546,7386,355,5242,
7384,72,1160,6572,285,694,2565,676,8198,845,6547,20230,12678,
6192,5246,7405,6190,5308,1608,6574,1161,6178,7400,7887,871,8204,
2458,7369,20252,6548,1464,11549,18499,20658,7372,11564,1671,
11554,7379,8380,7402,1680,6552,8820,8205,11608,20660,11565,11572,
11550,20616,11555,11584,11600,11578,20559,11604,11596,23892,
20661,11566,21551,23923,11580,11609,1719,11573,11551,20617,1672,
23893,11556,7373,21552,11601,23924,11605,20662,11567,20560,6554,
11597,11581,25289,23894,20569,30016,25286,21553,11585,30030,
11574,25288,23925,25272,25241,25202,34428,25269,29704,23920,
25234,25266,25251,29707,25248,25258,25212,25225,25264,25231,
469,25208,2048,25275,25242,30335,25203,30022,25236,30324,3411,
30330,30033,30357,30356,0
},
// CLASS 2
{
465,635,21084,19740,20271,498,639,21082,853,1152,1022,10290,
633,20287,19834,7328,20162,19742,647,31789,7294,25780,1044,5573,
20288,31785,26573,643,879,19750,5502,19835,19746,1026,20164,
20305,5599,19850,5588,10322,2878,1038,19939,10298,20289,5614,
19876,20911,20116,10291,19752,1042,2800,20915,20165,19836,19888,
20306,19852,642,19940,20290,5615,19891,10324,10299,10278,3472,
20166,5627,19977,20912,20922,1032,5589,20925,20918,20347,19895,
13819,34769,19837,4987,19941,20291,20307,19853,10312,19897,24275,
6940,10328,10300,19899,20929,20772,31895,20356,19978,20913,20923,
10292,1020,19942,20927,2812,10310,20919,20348,20292,19838,10313,
25782,24274,20308,19896,10326,20729,19854,25894,10308,10329,
19898,20930,10301,19943,20293,20357,32699,19979,25291,20914,
25290,20924,10293,10314,19900,25898,25890,25916,25895,25899,
25918,24239,25292,20928,10318,20773,20920,20349,23214,34767,
27158,27147,32223,27135,27151,27174,31892,31801,27142,27143,
27137,27150,27155,33776,27166,27138,27152,27180,27144,27145,
27139,27154,27160,32700,31884,27140,27148,27168,27173,27149,
27153,27141,27169,27136,27179,33072,32841,27170,0
},
// CLASS 3
{
75,2973,1494,13163,1978,3044,1130,5116,14260,13165,5149,883,
2641,6991,4195,24547,982,13549,1515,19883,14281,20736,4196,136,
24556,2974,6197,1002,1513,13795,1495,14261,14318,4197,2643,24557,
13550,19884,24495,14282,5118,781,14274,24440,1499,24475,14923,
3111,24494,24490,14323,3043,1462,4198,24558,14262,19885,14302,
3045,13551,19880,20900,14283,14319,13809,3661,24508,13161,35699,
25077,15629,5384,24441,24476,4199,14924,14269,14288,24559,24511,
14326,24514,1543,14263,19878,14272,13813,13552,20901,14284,4200,
14303,3662,24560,3034,14320,14267,24509,13159,15630,24463,14310,
24477,14925,14324,24512,14264,24515,19882,1510,20909,4201,14289,
24561,13553,20902,14285,14316,13542,14270,20043,14304,14327,
14279,14321,14273,4202,24562,14265,24510,15631,24464,24478,14926,
24513,13554,24516,19879,20905,14294,24132,20903,14286,13543,
20910,14317,5048,14290,24631,20190,14305,14266,14280,14322,14325,
14271,13555,14295,20904,27350,14287,25296,35700,15632,27351,
14311,27352,5049,14927,13544,25294,24632,27354,25295,27353,19801,
20906,14268,24133,27025,27015,34120,27014,34074,27023,27067,
34026,27018,27021,27016,27022,27044,27045,27046,34600,27019,
27020,27065,27364,27344,34477,36916,27362,27066,27068,0
},
// CLASS 4
{
2098,1752,1784,53,921,1776,1757,5277,6760,6770,5171,2983,2589,
1766,8647,703,1758,6761,1966,8676,1777,2590,1943,1785,1725,8631,
1759,1856,2836,6762,8724,1833,8649,1767,2591,6768,8639,2070,
1842,8632,408,1760,8623,8629,8725,2094,8696,8721,8650,8640,8633,
8621,8624,8637,1329,1860,1786,11267,1768,6774,1857,11279,11273,
11197,11289,11285,17347,11293,11299,11297,11268,26669,8643,34411,
11280,11303,11274,11290,11294,11300,11198,11269,17348,1769,11305,
11281,25300,31016,25302,11286,34412,11275,1787,26839,32645,26861,
26889,26679,26865,27448,27441,31224,26866,38764,26863,26867,
32684,38768,26884,26864,34413,5938,26862,0
},
// CLASS 5
{
2050,1243,2052,589,17,591,586,139,13908,9035,2053,8092,2006,
594,10797,32548,2652,588,1244,592,528,8122,6074,598,2054,8102,
19236,527,600,970,19296,44041,32676,2944,2651,9578,6346,13896,
2061,19281,14914,7128,453,6075,9484,18137,19261,2055,8103,2096,
2010,984,15262,8129,1245,3747,19238,9472,6076,992,19299,19276,
6063,15430,8104,17311,8124,19308,44043,9579,19271,19282,15263,
602,605,6065,596,976,1004,19262,552,9473,8131,6077,19240,6064,
1706,8105,10880,2767,19302,19277,988,15264,15431,17312,8192,
2791,6066,19309,9474,6078,6060,44044,14818,9592,19273,2060,19283,
1006,10874,8106,996,9485,19264,19241,15265,10898,10888,10957,
10892,19303,19278,10915,27799,10911,17313,10909,10927,19310,
10963,10945,10881,10933,15266,10875,10937,10899,21562,44045,
34861,19242,14819,10941,19274,10916,19284,10951,27870,10960,
10928,10893,19304,19265,19279,10964,27800,10946,17314,10953,
19311,15267,10900,10934,34863,10917,10876,27683,10890,10929,
10958,19243,10965,10947,10912,20770,10894,19305,44046,34864,
19280,27841,10942,19275,25314,19285,15261,27801,10952,27871,
18807,10938,10901,21564,10961,25316,27681,25315,10955,19312,
19266,34916,25233,25363,32379,25210,25379,25372,32546,34865,
25217,25221,25367,25437,25429,25384,34433,25446,25235,25596,
25467,25213,25331,25387,25308,33076,25435,25433,25477,25431,
25375,25364,44047,34866,25312,25441,25470,28275,25380,32375,
25389,25218,25392,39374,32999,25222,32996,25368,25461,34917,0
},
// CLASS 6
{ 0 },
// CLASS 7
{
8017,36591,8042,8071,2484,332,8044,529,324,8018,5730,8050,8024,
3599,8075,2008,1535,547,370,8045,548,8154,526,325,8019,8052,
8027,913,6390,8143,8056,8033,2645,5394,8004,915,6363,2870,8498,
8166,131,20609,8046,8181,939,905,10399,8155,8160,6196,8030,943,
8190,5675,8184,8053,8227,8038,8008,6391,546,556,8177,6375,10595,
20608,6364,36936,8232,421,8499,959,6041,945,8012,8512,8058,16314,
6495,10406,20610,10412,16339,8010,10585,10495,15107,8170,8249,
10478,10456,10391,6392,8161,1064,930,10447,6377,8005,8134,6365,
8235,11314,10537,8835,10613,10466,10392,10600,16315,10407,10622,
16341,10472,10586,10496,15111,20776,2860,10413,10526,16355,10395,
10431,10427,10462,15207,10437,25908,10486,11315,10448,10467,
10442,10614,10623,10479,16316,10408,10605,16342,10627,10396,
15208,10432,10587,10497,15112,10538,16387,10473,16356,10428,
20777,32593,10414,29228,25359,10463,25357,10468,10601,10438,
25361,16362,25422,25546,25585,25448,25479,24398,25439,25391,
25469,25508,25489,3738,25552,25570,25528,25577,2062,25500,25420,
25557,25560,25449,25525,25423,2894,25563,25464,25505,25454,25567,
25574,25533,33736,2825,25442,32594,25547,25457,25396,32182,25472,
25485,25509,25587,0
},
// CLASS 8
{
1459,168,5504,116,587,2136,143,5143,205,118,5505,7300,122,597,
604,145,130,1449,1460,2137,837,5144,2120,1008,3140,475,1953,
10,5506,12051,543,7301,7322,1463,12824,32271,3562,3567,32272,
3561,3563,8437,990,2138,6143,2948,5145,2139,8450,8400,2121,12505,
120,865,8406,1461,6141,759,8494,8444,8455,8438,11113,6127,8412,
8457,8401,7302,45438,12522,3565,3566,8416,6129,8422,8461,8407,
8492,6117,8445,13018,8427,8451,8402,8495,12523,8439,3552,8413,
8408,8417,10138,8458,8423,6131,7320,11426,12825,32266,11416,
11417,32267,10059,11418,8446,10169,10156,10159,10144,10148,8462,
12524,13019,10185,10179,10191,10201,10197,13031,22782,10205,
10211,10053,10173,10149,10215,12525,10160,10139,10223,10180,
10219,11419,11420,13020,10186,10145,10177,13032,10192,10206,
10170,10202,10199,10150,10230,12526,23028,10157,10212,33041,
10216,10181,10161,10054,13033,22783,10207,25345,13021,10187,
28612,10140,10174,10225,10151,25306,28609,25304,10220,10193,
12826,28271,28272,18809,33690,35715,27078,27080,30482,27130,
27075,27071,30451,33042,27086,27134,27133,27087,37420,33691,
35717,27073,27070,30455,27132,33944,27088,27085,27101,66,27131,
33946,38699,27128,27072,27124,27125,27127,27082,27126,38704,
33933,33717,27090,33043,27079,38692,32796,38697,33405,33938,
43987,27074,30449,0
},
// CLASS 9
{
348,686,688,172,702,1454,695,980,5782,6201,696,1120,707,697,
1108,755,705,6222,704,689,1455,5697,693,1014,5676,706,3698,1094,
5740,698,1088,712,6202,6205,699,126,6223,5138,8288,5500,18867,
1714,132,1456,17919,710,6366,6217,7658,3699,1106,20752,1086,
709,1098,1949,2941,691,7646,1490,6213,6229,18868,7648,5699,6226,
6219,17920,17951,2362,3700,11687,7641,11711,1010,7651,8289,18879,
20755,11733,5484,11665,18869,5784,7659,11707,6789,11683,17921,
11739,11671,17862,11703,11725,11693,11659,17952,11729,11721,
11699,11688,11677,18647,18930,17727,11712,18870,18880,6353,20756,
11719,18937,17925,11734,11667,1122,17922,11708,11675,11694,11660,
11740,18931,11672,11700,11704,11684,17928,17953,11717,17937,
6215,11689,18871,17924,11730,11713,17926,11726,11678,17923,18881,
18932,25311,20757,17728,603,11722,18938,11735,11695,11668,25309,
18540,11661,25307,28610,30413,23161,30404,27224,27219,28176,
27221,27263,27264,29722,27211,27266,27216,27210,27250,28172,
29858,27218,27229,27217,27259,27230,27223,27213,27222,29893,
27226,30909,27228,27220,28189,27215,27212,27209,30912,27238,
30910,27265,27260,30908,32231,30459,27243,30546,30414,30911,
30545,30405,0
},
// CLASS 10
{ 0 },
// CLASS 11
{
5185,1126,5176,8921,774,467,5177,339,5186,5487,1178,99,6795,
5232,6807,8924,1058,18960,5229,8936,5211,8946,5187,782,5178,
1066,8925,1430,779,1062,770,2637,6808,16810,8938,768,3025,1082,
1735,5188,6756,5215,20484,1079,2912,8926,2090,5221,2908,5179,
1822,8939,2782,780,1075,5217,2893,3137,1850,5189,6809,8949,5209,
3029,8998,5195,8927,16811,2091,9492,6798,778,17390,24974,5234,
20739,8940,6800,740,783,5180,9490,22568,6778,6785,5225,8972,
8928,1823,3627,8950,769,8914,22842,9005,8941,9493,6793,5201,
5196,8903,18657,16812,8992,8955,6780,9000,9634,20719,22827,16914,
29166,24975,8907,8929,6783,20742,8910,8918,9747,9749,17391,9745,
6787,9750,8951,22812,9758,1824,9752,9754,9756,8983,9821,22895,
9833,9823,9839,9829,8905,9849,9852,22828,16813,9856,9845,21849,
9888,17401,24976,33878,33876,9884,9880,9866,20747,9875,9862,
9892,9898,9834,9840,9894,9907,17392,9904,9857,9830,9901,9908,
9910,9912,22829,22896,9889,9827,9850,9853,18658,33986,33982,
9881,9835,17329,9867,9841,9876,31709,31018,21850,25297,17402,
24977,9885,9913,20748,9858,25299,9896,25298,9846,9863,27001,
26984,26998,26978,22570,24248,26987,26981,33763,27003,26997,
26992,33357,26999,26980,26993,27011,33745,27006,27005,27000,
26996,27008,26986,26989,33943,33987,33983,27009,27004,26979,
26994,26982,26985,33786,26991,27012,27013,26990,26988,27002,
26995,40120,26983,0
},
};
uint32 c = plr->getClass();
for(uint32 i = 0; spellarray[c][i] != 0; ++i)
{
plr->addSpell(spellarray[c][i]);
}
static uint32 paladinspellarray[RACE_DRAENEI+1][2] = {
{ 0 }, // RACE 0
{ 13819, 0 }, // HUMAN
{ 0 }, // ORC
{ 13819, 0 }, // DWARF
{ 0 }, // NIGHTELF
{ 0 }, // UNDEAD
{ 0 }, // TAUREN
{ 0 }, // GNOME
{ 0 }, // TROLL
{ 34769, 0 }, // BLOODELF
{ 13819, 0 }, // DRAENEI
};
static uint32 priestspellarray[RACE_DRAENEI+1][16] = {
{ 0 }, // RACE 0
{ 13896,13908,19236,19238,19240,19241,19242,19243,19271,19273,19274,19275,25437,25441,0 }, // HUMAN
{ 0 }, // ORC
{ 13908,19236,19238,19240,44041,19241,19242,19243,25437,44043,44044,44045,44046,44047,0 }, // DWARF
{ 2651,10797,19296,19299,19302,19303,19304,19305,25446,0 }, // NIGHTELF
{ 2652,2944,19261,19262,19264,19265,19266,19276,19277,19278,19279,19280,25461,25467,0 }, // UNDEAD
{ 0 }, // TAUREN
{ 0 }, // GNOME
{ 9035,18137,19281,19282,19283,19284,19285,19308,19309,19310,19311,19312,25470,25477,0 }, // TROLL
{ 2652,19261,19262,19264,19265,19266,25461,32676,0 }, // BLOODELF
{ 32548,44041,44043,44044,44045,44046,44047,0 }, // DRAENEI
};
static uint32 shamanspellarray[RACE_DRAENEI+1][2] = {
{ 0 }, // RACE 0
{ 0 }, // HUMAN
{ 2825, 0 }, // ORC
{ 0 }, // DWARF
{ 0 }, // NIGHTELF
{ 0 }, // UNDEAD
{ 2825, 0 }, // TAUREN
{ 0 }, // GNOME
{ 2825, 0 }, // TROLL
{ 0 }, // BLOODELF
{ 32182, 0 }, // DRAENEI
};
static uint32 magespellarray[RACE_DRAENEI+1][11] = {
{ 0 }, // RACE 0
{ 3561, 3562, 3565, 10059, 11416, 11419, 32266, 32271, 33690, 33691, 0 }, // HUMAN
{ 3563, 3566, 3567, 11417, 11418, 11420, 32267, 32272, 35715, 35717, 0 }, // ORC
{ 3561, 3562, 3565, 10059, 11416, 11419, 32266, 32271, 33690, 33691, 0 }, // DWARF
{ 3561, 3562, 3565, 10059, 11416, 11419, 32266, 32271, 33690, 33691, 0 }, // NIGHTELF
{ 3563, 3566, 3567, 11417, 11418, 11420, 32267, 32272, 35715, 35717, 0 }, // UNDEAD
{ 3563, 3566, 3567, 11417, 11418, 11420, 32267, 32272, 35715, 35717, 0 }, // TAUREN
{ 3561, 3562, 3565, 10059, 11416, 11419, 32266, 32271, 33690, 33691, 0 }, // GNOME
{ 3563, 3566, 3567, 11417, 11418, 11420, 32267, 32272, 35715, 35717, 0 }, // TROLL
{ 3563, 3566, 3567, 11417, 11418, 11420, 32267, 32272, 35715, 35717, 0 }, // BLOODELF
{ 3561, 3562, 3565, 10059, 11416, 11419, 32266, 32271, 33690, 33691, 0 }, // DRAENEI
};
uint32 r = plr->getRace();
switch(c)
{
case PALADIN:
for( uint32 i = 0; paladinspellarray[r][i] != 0; ++i )
{
plr->addSpell( paladinspellarray[r][i] );
}
break;
case PRIEST:
for( uint32 i = 0; priestspellarray[r][i] != 0; ++i )
{
plr->addSpell( priestspellarray[r][i] );
}
break;
case MAGE:
for( uint32 i = 0; magespellarray[r][i] != 0; ++i )
{
plr->addSpell( magespellarray[r][i] );
}
break;
case SHAMAN:
for( uint32 i = 0; shamanspellarray[r][i] != 0; ++i )
{
plr->addSpell( shamanspellarray[r][i] );
}
break;
}
}