Like mentioned it is in player.cpp
I got this information from SeetheZorZ post here
Look for this line (Line 661)
SetUInt32Value(UNIT_FIELD_LEVEL, 1 );
Set the 1 to 70
Like mentioned it is in player.cpp
I got this information from SeetheZorZ post here
Look for this line (Line 661)
SetUInt32Value(UNIT_FIELD_LEVEL, 1 );
Set the 1 to 70
Thanks dude !![]()
Most welcome.
Quoted for Truth?
Here is that section of the guide in full:
Making All Characters start at Level 70:
Go into "Ascent Compile/src/game/Player.cpp""Ascent Compile/src/ascent-world/Player.cpp"
Find the line:
Change the 1 to 70.Code:SetUInt32Value(UNIT_FIELD_LEVEL, 1 );
Save the file.
Compile Ascent.
Last edited by Saedusii; 02-06-2008 at 01:49 PM.
And How could I make the HUNTER PET to dont be hungry and to be lvl 70 like the owne of it ! ?
without much of c++ knowledge i used search and woot how easy can it be:
i think it is that...Code:// Set Starting stats for char SetFloatValue(OBJECT_FIELD_SCALE_X, ((race==RACE_TAUREN)?1.3f:1.0f)); SetUInt32Value(UNIT_FIELD_HEALTH, info->health); SetUInt32Value(UNIT_FIELD_POWER1, info->mana ); //SetUInt32Value(UNIT_FIELD_POWER2, 0 ); // this gets devided by 10 SetUInt32Value(UNIT_FIELD_POWER3, info->focus ); SetUInt32Value(UNIT_FIELD_POWER4, info->energy ); SetUInt32Value(UNIT_FIELD_MAXHEALTH, info->health); SetUInt32Value(UNIT_FIELD_MAXPOWER1, info->mana ); SetUInt32Value(UNIT_FIELD_MAXPOWER2, info->rage ); SetUInt32Value(UNIT_FIELD_MAXPOWER3, info->focus ); SetUInt32Value(UNIT_FIELD_MAXPOWER4, info->energy ); //THIS IS NEEDED SetUInt32Value(UNIT_FIELD_BASE_HEALTH, info->health); SetUInt32Value(UNIT_FIELD_BASE_MANA, info->mana ); SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, info->factiontemplate ); SetUInt32Value(UNIT_FIELD_LEVEL, 1 ); SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) ); //UNIT_FIELD_BYTES_1 (standstate) | (unk1) | (unk2) | (attackstate) if(class_ == WARRIOR) SetShapeShift(FORM_BATTLESTANCE);can anyone confirm?
edit: this is in player.cpp btw...
grtz![]()
Yea Thats it ! ^^ thanks
And now anyone know how I remove the hunter pet food? So he dosent need food to be always happy?![]()
You don't have to edit your core to do this. You can create a c++ addon that hooks to SERVER_HOOK_ON_FIRST_ENTER_WORLD and have it set the player's level or any other stats you want. The following is an example. Just create the following files with their respective content, compile, and reload the server.
-----Makefile.am--------
INCLUDES += -I$(srcdir) -I$(srcdir)/../../../../dep/include -I$(srcdir)/../../../ascent-shared
INCLUDES += -I$(srcdir)/../../../ascent-world -I$(srcdir)/../../../../dep/src
AM_CXXFLAGS = -DSCRIPTLIB
lib_LTLIBRARIES = libOnFirstEnterWorld.la
libOnFirstEnterWorld_la_SOURCES = Setup.cpp
-----Setup.h------
void OnFirstEnterWorld(Player * plr);
void doLevel70(Player * plr);
----Setup.cpp---------
#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);
}
Last edited by waymirec; 02-14-2008 at 10:29 PM.
Example 1: Changing 1 digit
Example 2: Writing an addon.
WOW.
I have to say Example 1 is quite simple.
The difference is that with an addon you do it once and you're done. With a core edit you have to remember to do it each time you upgrade the core. Also, with an addon you have the benefit of being able to "disable" it by simply moving/removing the addon and restarting the world server. To each his own though![]()