public eWEAPON_TYPE GetWeaponTypeFromString(string strWeaponName) { eWEAPON_TYPE result = eWEAPON_TYPE.WEAPON_NONE; switch (strWeaponName) { case "SWORD": result = eWEAPON_TYPE.WEAPON_SWORD; break; case "SPEAR": result = eWEAPON_TYPE.WEAPON_SPEAR; break; case "AXE": result = eWEAPON_TYPE.WEAPON_AXE; break; case "BOW": result = eWEAPON_TYPE.WEAPON_BOW; break; case "GUN": result = eWEAPON_TYPE.WEAPON_GUN; break; case "CANNON": result = eWEAPON_TYPE.WEAPON_CANNON; break; case "STAFF": result = eWEAPON_TYPE.WEAPON_STAFF; break; case "BIBLE": result = eWEAPON_TYPE.WEAPON_BIBLE; break; case "SHIELD": result = eWEAPON_TYPE.WEAPON_SHIELD; break; case "ORB": result = eWEAPON_TYPE.WEAPON_ORB; break; } return(result); }
public string GetWeapon() { NrCharBase charBase = this.m_charBase; if (charBase != null) { eWEAPON_TYPE weaponType = (eWEAPON_TYPE)charBase.GetWeaponType(); string text = weaponType.ToString(); return(text.ToUpper()); } if (this.m_battleChar != null) { eWEAPON_TYPE attackCharWeaponType = (eWEAPON_TYPE)this.m_battleChar.GetAttackCharWeaponType(); string text2 = attackCharWeaponType.ToString(); return(text2.ToUpper()); } return("Null"); }