04-24-2022, 05:07 PM
51 minutes ago, Scura said:
That's my struct from my ItemAll never finished
I see many differencies from your struct /index.php?/profile/14423-nicolasg/&do=hovercard" data-mentionid="14423" href="/index.php?/profile/14423-nicolasg/" rel="">@nicolasg... ?
namespace ItemAll_Ep4.CS
{
public class Item
{
public int index;
public int job;
public int stack;
public int fame;
public int level;
public double flag;
public int wearing;
public int type;
public int subType;
public int[] needItemIndex;
public int[] needItemCount;
public int needSSkillIndex;
public int needSSkillCount;
public int needSSkillIndex2;
public int needSSkillCount2;
public int textureID;
public int textureRow;
public int textureCol;
public int num0;
public int num1;
public int num2;
public int num3;
public int price;
public int set0;
public int set1;
public int set2;
public int set3;
public int set4;
public string fileSMC;
public string efffectName;
public string attackEffectName;
public string damageEffectName;
public int JewelOptionType;
public int JewelOptionLevel;
public int[] rareOptionType;
public int[] rareOptionLevel;
public int syndicate_type;
public int syndicate_grade;
public int fortuneIndex;
public string castleWar;
}
public class Stringhe : Item
{
public string name;
public string descrition;
}
}
I have 2 doubts...
1) The damona code changes the order, writes the value of a_castle_war first and then the fortuneIndex (I understand that this is a bug in your code).
2) I also see that it makes a strange loop, unnecessary in my understanding of c#, since it would be easier to take the value of a_index and write it directly, right? Attached reference code:
int ordinal75 = mySqlDataReader1.GetOrdinal("a_castle_war");
string str6 = mySqlDataReader1.GetString(ordinal75);
binaryWriter.Write(Convert.ToByte(str6));
string str7 = "SELECT * FROM t_fortune_data WHERE a_item_idx = " + s1 + " ORDER BY a_skill_index, a_skill_level";
MySqlConnection mySqlConnection2 = new MySqlConnection(connectionString);
MySqlCommand command2 = mySqlConnection2.CreateCommand();
command2.CommandText = str7;
mySqlConnection2.Open();
MySqlDataReader mySqlDataReader2 = command2.ExecuteReader();
while (mySqlDataReader2.Read())
{
int ordinal76 = mySqlDataReader2.GetOrdinal("a_item_idx");
string s71 = mySqlDataReader2.GetString(ordinal76);
binaryWriter.Write(int.Parse(s71));
}
I also see that both in the game source code and in your code castleWar was define as char, when in the database it is tinyint and in the Damona code it is also treated as an int, I don't know if it is irrelevant or not...

