This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] How to get new players to start in phase 2?  (Read 1249 times)

frommeboys

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
[QUESTION] How to get new players to start in phase 2?
« 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Adspartan

  • Noggit Developer
  • GM Isle Explorer
  • *****
  • Posts: 22
    • View Profile
Re: [QUESTION] How to get new players to start in phase 2?
« Reply #1 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)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Legion > Wotlk converter
Follow noggit dev/report bugs here

frommeboys

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [QUESTION] How to get new players to start in phase 2?
« Reply #2 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »