This commit is contained in:
neckkola
2022-05-17 22:31:04 -03:00
24 changed files with 3783 additions and 525 deletions
@@ -28,6 +28,9 @@ public:
int isgroupleader;
int israidleader;
int islooter;
#ifdef BOTS
int isbot;
#endif
};
static std::string PrimaryKey()
@@ -47,6 +50,9 @@ public:
"isgroupleader",
"israidleader",
"islooter",
#ifdef BOTS
"isbot",
#endif
};
}
@@ -111,6 +117,9 @@ public:
entry.isgroupleader = 0;
entry.israidleader = 0;
entry.islooter = 0;
#ifdef BOTS
entry.isbot = 0;
#endif
return entry;
}
@@ -154,7 +163,10 @@ public:
entry.name = row[5] ? row[5] : "";
entry.isgroupleader = atoi(row[6]);
entry.israidleader = atoi(row[7]);
entry.islooter = atoi(row[8]);
entry.islooter = atoi(row[8]);
#ifdef BOTS
entry.isbot = atoi(row[9]);
#endif
return entry;
}
@@ -197,6 +209,9 @@ public:
update_values.push_back(columns[6] + " = " + std::to_string(raid_members_entry.isgroupleader));
update_values.push_back(columns[7] + " = " + std::to_string(raid_members_entry.israidleader));
update_values.push_back(columns[8] + " = " + std::to_string(raid_members_entry.islooter));
#ifdef BOTS
update_values.push_back(columns[9] + " = " + std::to_string(raid_members_entry.isbot));
#endif
auto results = db.QueryDatabase(
fmt::format(
@@ -227,7 +242,9 @@ public:
insert_values.push_back(std::to_string(raid_members_entry.isgroupleader));
insert_values.push_back(std::to_string(raid_members_entry.israidleader));
insert_values.push_back(std::to_string(raid_members_entry.islooter));
#ifdef BOTS
insert_values.push_back(std::to_string(raid_members_entry.isbot));
#endif
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
@@ -265,7 +282,9 @@ public:
insert_values.push_back(std::to_string(raid_members_entry.isgroupleader));
insert_values.push_back(std::to_string(raid_members_entry.israidleader));
insert_values.push_back(std::to_string(raid_members_entry.islooter));
#ifdef BOTS
insert_values.push_back(std::to_string(raid_members_entry.isbot));
#endif
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
@@ -307,7 +326,9 @@ public:
entry.isgroupleader = atoi(row[6]);
entry.israidleader = atoi(row[7]);
entry.islooter = atoi(row[8]);
#ifdef BOTS
entry.isbot = atoi(row[9]);
#endif
all_entries.push_back(entry);
}
@@ -340,7 +361,9 @@ public:
entry.isgroupleader = atoi(row[6]);
entry.israidleader = atoi(row[7]);
entry.islooter = atoi(row[8]);
#ifdef BOTS
entry.isbot = atoi(row[9]);
#endif
all_entries.push_back(entry);
}
+3
View File
@@ -622,10 +622,13 @@ RULE_REAL(Bots, LeashDistance, 562500.0f, "Distance a bot is allowed to travel f
RULE_BOOL(Bots, AllowApplyPoisonCommand, true, "Allows the use of the bot command 'applypoison'")
RULE_BOOL(Bots, AllowApplyPotionCommand, true, "Allows the use of the bot command 'applypotion'")
RULE_BOOL(Bots, RestrictApplyPotionToRogue, true, "Restricts the bot command 'applypotion' to rogue-usable potions (i.e., poisons)")
RULE_BOOL(Bots, DisplayHealDamage, false, "Enables the display of bot heal damage to the bot owner client")
RULE_BOOL(Bots, DisplaySpellDamage, false, "Enables the display of bot spell damage to the bot owner client")
RULE_BOOL(Bots, OldRaceRezEffects, false, "Older clients had ID 757 for races with high starting STR, but it doesn't seem used anymore")
RULE_BOOL(Bots, ResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")
RULE_INT(Bots, OldResurrectionSicknessSpell, 757, "757 is Default Old Resurrection Sickness Spell")
RULE_INT(Bots, ResurrectionSicknessSpell, 756, "756 is Default Resurrection Sickness Spell")
RULE_CATEGORY_END()
#endif
+3
View File
@@ -57,6 +57,9 @@ typedef const char Const_char; //for perl XS
#define safe_delete(d) if(d) { delete d; d=nullptr; }
#define safe_delete_array(d) if(d) { delete[] d; d=nullptr; }
//#define safe_delete(d)(_RPTF0(_CRT_WARN,"Testing delete function\n"));
//#define safe_delete(d) if(d) { }
//#define safe_delete_array(d) if(d) { }
#define L32(i) ((uint32) i)
#define H32(i) ((uint32) (i >> 32))
#define L16(i) ((uint16) i)