本文整理汇总了C#中Character.getcClass方法的典型用法代码示例。如果您正苦于以下问题:C# Character.getcClass方法的具体用法?C# Character.getcClass怎么用?C# Character.getcClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character.getcClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: canLearnSkill
public Boolean canLearnSkill(Character chr, int ID)
{
if(!this.skills.ContainsKey(ID))
{
Console.WriteLine("playa already has dat skill");
return false;
}
SkillData skill = skills[ID];
if(skill.getChClass() != chr.getcClass() && skill.getChClass()!=0){
Console.WriteLine("Cannot learn skill [wrong character class]");
return false;
}
if(skill.getLvl()>chr.getLevel()){
Console.WriteLine("Cannot learn skill [lvl too low]");
return false;
}
if(skill.getFaction()!=0 && skill.getFaction()!=chr.getFaction()){
Console.WriteLine("Cannot learn skill [wrong faction]");
return false;
}
if(skill.getSkillPoints()>chr.getSkillPoints()){
Console.WriteLine("Cannot learn skill [not enough skillpoints]");
return false;
}
if((!chr.getSkills().getLearnedSkills().Contains(skill.getReqSkill1()) && skill.getReqSkill1() != 0) || (!chr.getSkills().getLearnedSkills().Contains(skill.getReqSkill2()) && skill.getReqSkill2() != 0) || (!chr.getSkills().getLearnedSkills().Contains(skill.getReqSkill3()) && skill.getReqSkill3() != 0))
{
Console.WriteLine("Cannot learn skill [you do not have the req skills]");
return false;
}
return true;
}
示例2: getDmgFactorByClass
public float getDmgFactorByClass(Character chr)
{
switch(chr.getcClass())
{
case 1:
{
return 1.2f;
}
case 2:
{
return 1.1f;
}
case 3:
{
return 1;
}
case 4:
{
return 1;
}
default:
{
return 1;
}
}
}
示例3: getSkillIDFromCast
public int getSkillIDFromCast(Character ch, byte decrypted)
{
int skillIDInt = 0;
int key=(int) decrypted;
if(key <= ch.getSkills().getLearnedSkills().Count){
skillIDInt = ch.getSkills().getLearnedSkills()[key];
}else{
if(decrypted==(byte)0xFF){
if(ch.getEquipment().getEquipments().ContainsKey(7))
skillIDInt = woodenSkills[ch.getcClass()];
else
skillIDInt = knockSkills[ch.getcClass()];
}else{
Console.WriteLine("Cannot cast skill [skill not learned]");
}
}
return skillIDInt;
}
示例4: createEquipments
public static int createEquipments(Character chr)
{
switch(chr.getcClass())
{
case 1:
{
chr.getEquipment().getEquipments().Add(0, new Item(210110101));
chr.getEquipment().getEquipments().Add(1, new Item(207114101));
chr.getEquipment().getEquipments().Add(3, new Item(202110103));
chr.getEquipment().getEquipments().Add(4, new Item(203110102));
chr.getEquipment().getEquipments().Add(6, new Item(209114101));
chr.getEquipment().getEquipments().Add(7, new Item(201011002));
chr.getEquipment().getEquipments().Add(9, new Item(208114101));
chr.getEquipment().getEquipments().Add(10, new Item(208114101));
chr.getEquipment().getEquipments().Add(11, new Item(206110102));
break;
}
case 2:
{
chr.getEquipment().getEquipments().Add(0, new Item(210220101));
chr.getEquipment().getEquipments().Add(1, new Item(207224101));
chr.getEquipment().getEquipments().Add(3, new Item(202220103));
chr.getEquipment().getEquipments().Add(4, new Item(203220102));
chr.getEquipment().getEquipments().Add(6, new Item(209225101));
chr.getEquipment().getEquipments().Add(7, new Item(201011008));
chr.getEquipment().getEquipments().Add(9, new Item(208224101));
chr.getEquipment().getEquipments().Add(10, new Item(208224101));
chr.getEquipment().getEquipments().Add(11, new Item(206220102));
break;
}
case 3:
{
chr.getEquipment().getEquipments().Add(0, new Item(210130101));
chr.getEquipment().getEquipments().Add(1, new Item(207134101));
chr.getEquipment().getEquipments().Add(3, new Item(202130103));
chr.getEquipment().getEquipments().Add(4, new Item(203130102));
chr.getEquipment().getEquipments().Add(6, new Item(209135101));
chr.getEquipment().getEquipments().Add(7, new Item(201011014));
chr.getEquipment().getEquipments().Add(9, new Item(208134101));
chr.getEquipment().getEquipments().Add(10, new Item(208134101));
chr.getEquipment().getEquipments().Add(11, new Item(206130102));
break;
}
case 4:
{
chr.getEquipment().getEquipments().Add(0, new Item(210140101));
chr.getEquipment().getEquipments().Add(1, new Item(207144101));
chr.getEquipment().getEquipments().Add(3, new Item(202140103));
chr.getEquipment().getEquipments().Add(4, new Item(203140102));
chr.getEquipment().getEquipments().Add(6, new Item(209140101));
chr.getEquipment().getEquipments().Add(7, new Item(201011020));
chr.getEquipment().getEquipments().Add(9, new Item(208144101));
chr.getEquipment().getEquipments().Add(10, new Item(208144101));
chr.getEquipment().getEquipments().Add(11, new Item(206140102));
break;
}
}
MySQLTool.SaveEquipments(chr);
return 1;
}