I have been working with my charactercreation.cs today and have setup separate starting locations for all 7 templates: Samurai, Ninja, Paladin, Necro, Warrior, Mage and Blacksmith. Right now they all have quest locations in trammel where they start. If you choose Advanced you may select your starting city from the map but what I would also like to do is somehow FLAG that "template" so that if you choose advanced you start out NOT young. All the other profession templates WILL be young. Does anyone know how I can achieve this? Here is where I am working in charactercreation.cs.
Code:
private static CityInfo GetStartLocation( CharacterCreatedEventArgs args, bool isYoung )
{
if( Core.ML )
{
if( args.State != null && args.State.NewHaven )
//return m_NewHavenInfo; //We don't get the client Version until AFTER Character creation
return args.City; //TODO: Uncomment when the old quest system is actually phased out
}
bool useHaven = isYoung;
ClientFlags flags = args.State == null ? ClientFlags.None : args.State.Flags;
Mobile m = args.Mobile;
switch ( args.Profession )
{
case 0: //Advanced
{
//return new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Trammel );
return args.City;
}
case 1: //Warrior
{
return new CityInfo( "Haven", "Uzeraan's Mansion", 3578, 2589, 0, Map.Trammel );
}
case 2: //Mage
{
return new CityInfo( "Haven", "Uzeraan's Mansion", 3578, 2589, 0, Map.Trammel );
}
case 3: //Blacksmith
{
return new CityInfo( "Haven", "Uzeraan's Forge", 3598, 2604, 0, Map.Trammel );
}
case 4: //Necro
{
if ( (flags & ClientFlags.Malas) != 0 )
{
return new CityInfo( "Umbra", "Mardoth's Tower", 2114, 1301, -50, Map.Malas );
}
else
{
useHaven = true;
new BadStartMessage( m, 1062205 );
/*
* Unfortunately you are playing on a *NON-Age-Of-Shadows* game
* installation and cannot be transported to Malas.
* You will not be able to take your new player quest in Malas
* without an AOS client. You are now being taken to the city of
* Haven on the Trammel facet.
* */
}
break;
}
case 5: //Paladin
{
return new CityInfo( "Haven", "Uzeraan's Mansion", 3578, 2589, 0, Map.Trammel );
}
case 6: //Samurai
{
if ( (flags & ClientFlags.Tokuno) != 0 )
{
return new CityInfo( "Samurai DE", "Haoti's Grounds", 368, 780, -1, Map.Malas );
}
else
{
useHaven = true;
new BadStartMessage( m, 1063487 );
/*
* Unfortunately you are playing on a *NON-Samurai-Empire* game
* installation and cannot be transported to Tokuno.
* You will not be able to take your new player quest in Tokuno
* without an SE client. You are now being taken to the city of
* Haven on the Trammel facet.
* */
}
break;
}
case 7: //Ninja
{
if ( (flags & ClientFlags.Tokuno) != 0 )
{
return new CityInfo( "Ninja DE", "Enimo's Residence", 414, 823, -1, Map.Malas );
}
else
{
useHaven = true;
new BadStartMessage( m, 1063487 );
/*
* Unfortunately you are playing on a *NON-Samurai-Empire* game
* installation and cannot be transported to Tokuno.
* You will not be able to take your new player quest in Tokuno
* without an SE client. You are now being taken to the city of
* Haven on the Trammel facet.
* */
}
break;
}
}
/* if( useHaven )
return m_NewHavenInfo;
else */
return args.City;
}