Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: frommeboys on September 09, 2016, 05:52:25 am

Title: [QUESTION] How to get new players to start in phase 2?
Post by: frommeboys on September 09, 2016, 05:52:25 am
So, I want new players to start in the gadgetzan arena, however I don't want to completely change gadgetzan for when players go back there after leveling.  I have the mobs all there in phase 2, but I don't know how to get the players to start in a phase other than one.  I looked around player.cpp, and it might be there, but I dont know the exact syntax for the phase, or I think it could be posible using playercreateinfo_cast_spell with a spell that changes phase, but I didnt see one when I looked.
Any help is appreciated.
Title: Re: [QUESTION] How to get new players to start in phase 2?
Post by: Adspartan on September 09, 2016, 10:01:30 pm
Assuming you're using Trinitycore 3.3.5 (idk about the other extensions):

Just create a PlayerScript and override this function to set the player to the phase you want :
Code: [Select]
virtual void OnLogin(Player* /*player*/, bool /*firstLogin*/) { }(in ScriptMgr.h)
Title: Re: [QUESTION] How to get new players to start in phase 2?
Post by: frommeboys on September 10, 2016, 10:03:45 pm
I've done some core edits before, but I havent written any scripts as of yet.
Are you suggesting I create a new funtions that looks something like
OnLogin(Player* /*player*/, bool /*firstLogin*/, uint32 /*phase#*/)       ?

Or are you suggesting that I call the current OnLogin and do stuffs with it?