if (player.Race == (int)eRace.Rogue == false)
player.race = (int)eRace.Rogue;
if (player.Race == (int)eRace.Rogue == false)
string PlayerRace = "";
if (player.Race == (short)eRace.Briton) { PlayerRace = "Briton"; }
else { PlayerRace = "Unknow"; }
@elcotek :- Rogue is player class, not player race
- Code: Select all
if (player.Race == (int)eRace.Rogue == false)
- why using == false after already comparaison ?
@DrStrange :
If you want to set player race, set it by database.
If you want to compare, use like this :If you tell to go to player.Race definition, you can see his type is short.
- Code: Select all
string PlayerRace = ""; if (player.Race == (short)eRace.Briton) { PlayerRace = "Briton"; } else { PlayerRace = "Unknow"; }
namespace DOL.GS.Scripts
{
public class AlbionClassSelector : GameNPC {
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private enum eCharacterClass : byte
{
//alb classes
Armsman = 2,
Cabalist = 13,
Cleric = 6,
Friar = 10,
Heretic = 33,
Infiltrator = 9,
Mercenary = 11,
Minstrel = 4,
Necromancer = 12,
Paladin = 1,
Reaver = 19,
Scout = 3,
Sorcerer = 8,
Theurgist = 5,
Wizard = 7,
MaulerAlb = 60,
}
public override eQuestIndicator GetQuestIndicator(GamePlayer player)
{
if (player.Level == 5) return eQuestIndicator.Available;
return eQuestIndicator.None;
}
public override bool Interact(GamePlayer p)
{
GamePlayer player = p as GamePlayer;
if (p == null)
return false;
if (player.Race == (int)eRace.AlbionMinotaur)
{
player.Out.SendMessage("Sorry Minotaur, HalfOgre, Frostalf, and Shar's are disabled on this server.\n\nPlease see the race changer to my right.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
return false;
}
if (player.CharacterClass.ID == (int) eCharacterClass.Bainshee)
{
player.Out.SendMessage("Sorry but Bainshee, Heretic, Maulers, Valkyrie, and Vampiir is disabled on this server. Please see the class change to my right", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
return false;
}
if (player.Race != (int)eRace.Inconnu)
{
player.Out.SendMessage("Sorry Inconnu only!.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
return false;
}
Users browsing this forum: No registered users and 1 guest