mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-14 11:28:08 +00:00
Use field names instead of numbers for CDClient tables (#945)
This commit is contained in:
@@ -23,25 +23,25 @@ CDSkillBehaviorTable::CDSkillBehaviorTable(void) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM SkillBehavior");
|
||||
while (!tableData.eof()) {
|
||||
CDSkillBehavior entry;
|
||||
entry.skillID = tableData.getIntField(0, -1);
|
||||
UNUSED(entry.locStatus = tableData.getIntField(1, -1));
|
||||
entry.behaviorID = tableData.getIntField(2, -1);
|
||||
entry.imaginationcost = tableData.getIntField(3, -1);
|
||||
entry.cooldowngroup = tableData.getIntField(4, -1);
|
||||
entry.cooldown = tableData.getFloatField(5, -1.0f);
|
||||
UNUSED(entry.isNpcEditor = tableData.getIntField(6, -1) == 1 ? true : false);
|
||||
UNUSED(entry.skillIcon = tableData.getIntField(7, -1));
|
||||
UNUSED(entry.oomSkillID = tableData.getStringField(8, ""));
|
||||
UNUSED(entry.oomBehaviorEffectID = tableData.getIntField(9, -1));
|
||||
UNUSED(entry.castTypeDesc = tableData.getIntField(10, -1));
|
||||
UNUSED(entry.imBonusUI = tableData.getIntField(11, -1));
|
||||
UNUSED(entry.lifeBonusUI = tableData.getIntField(12, -1));
|
||||
UNUSED(entry.armorBonusUI = tableData.getIntField(13, -1));
|
||||
UNUSED(entry.damageUI = tableData.getIntField(14, -1));
|
||||
UNUSED(entry.hideIcon = tableData.getIntField(15, -1) == 1 ? true : false);
|
||||
UNUSED(entry.localize = tableData.getIntField(16, -1) == 1 ? true : false);
|
||||
UNUSED(entry.gate_version = tableData.getStringField(17, ""));
|
||||
UNUSED(entry.cancelType = tableData.getIntField(18, -1));
|
||||
entry.skillID = tableData.getIntField("skillID", -1);
|
||||
UNUSED(entry.locStatus = tableData.getIntField("locStatus", -1));
|
||||
entry.behaviorID = tableData.getIntField("behaviorID", -1);
|
||||
entry.imaginationcost = tableData.getIntField("imaginationcost", -1);
|
||||
entry.cooldowngroup = tableData.getIntField("cooldowngroup", -1);
|
||||
entry.cooldown = tableData.getFloatField("cooldown", -1.0f);
|
||||
UNUSED(entry.isNpcEditor = tableData.getIntField("isNpcEditor", -1) == 1 ? true : false);
|
||||
UNUSED(entry.skillIcon = tableData.getIntField("skillIcon", -1));
|
||||
UNUSED(entry.oomSkillID = tableData.getStringField("oomSkillID", ""));
|
||||
UNUSED(entry.oomBehaviorEffectID = tableData.getIntField("oomBehaviorEffectID", -1));
|
||||
UNUSED(entry.castTypeDesc = tableData.getIntField("castTypeDesc", -1));
|
||||
UNUSED(entry.imBonusUI = tableData.getIntField("imBonusUI", -1));
|
||||
UNUSED(entry.lifeBonusUI = tableData.getIntField("lifeBonusUI", -1));
|
||||
UNUSED(entry.armorBonusUI = tableData.getIntField("armorBonusUI", -1));
|
||||
UNUSED(entry.damageUI = tableData.getIntField("damageUI", -1));
|
||||
UNUSED(entry.hideIcon = tableData.getIntField("hideIcon", -1) == 1 ? true : false);
|
||||
UNUSED(entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false);
|
||||
UNUSED(entry.gate_version = tableData.getStringField("gate_version", ""));
|
||||
UNUSED(entry.cancelType = tableData.getIntField("cancelType", -1));
|
||||
|
||||
this->entries.insert(std::make_pair(entry.skillID, entry));
|
||||
//this->entries.push_back(entry);
|
||||
@@ -82,3 +82,4 @@ const CDSkillBehavior& CDSkillBehaviorTable::GetSkillByID(unsigned int skillID)
|
||||
|
||||
return m_empty;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user