mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Merge fix with sql
This commit is contained in:
commit
0662e3c780
@ -419,6 +419,7 @@ RULE_BOOL(Combat, EnableFearPathing, true)
|
|||||||
RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker.
|
RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker.
|
||||||
RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used.
|
RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used.
|
||||||
RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee.
|
RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee.
|
||||||
|
RULE_INT(Combat, FleeGrayMaxLevel, 18) // NPC's above this level won't do gray/green con flee
|
||||||
RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee.
|
RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee.
|
||||||
RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it.
|
RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it.
|
||||||
RULE_BOOL(Combat, AdjustProcPerMinute, true)
|
RULE_BOOL(Combat, AdjustProcPerMinute, true)
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9129
|
#define CURRENT_BINARY_DATABASE_VERSION 9130
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -383,7 +383,8 @@
|
|||||||
9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty|
|
9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty|
|
||||||
9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty|
|
9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty|
|
||||||
9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty|
|
9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty|
|
||||||
9130|2018_11_11_StuckBehavior.sql|SHOW COLUMNS FROM `npc_types` LIKE 'stuck_behavior'|empty|
|
9130|2018_11_25_name_filter_update.sql|SHOW COLUMS FROM `name_filter` LIKE 'id'|empty|
|
||||||
|
9131|2018_11_25_StuckBehavior.sql|SHOW COLUMNS FROM `npc_types` LIKE 'stuck_behavior'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
5
utils/sql/git/required/2018_11_25_name_filter_update.sql
Normal file
5
utils/sql/git/required/2018_11_25_name_filter_update.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE `name_filter`
|
||||||
|
ADD COLUMN `id` INT(11) NULL AUTO_INCREMENT FIRST,
|
||||||
|
DROP PRIMARY KEY,
|
||||||
|
ADD PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
ADD INDEX `name_search_index`(`name`);
|
||||||
@ -10,6 +10,7 @@ adventure_template_entry
|
|||||||
adventure_template_entry_flavor
|
adventure_template_entry_flavor
|
||||||
altadv_vars
|
altadv_vars
|
||||||
alternate_currency
|
alternate_currency
|
||||||
|
auras
|
||||||
base_data
|
base_data
|
||||||
blocked_spells
|
blocked_spells
|
||||||
books
|
books
|
||||||
|
|||||||
13
zone/aa.cpp
13
zone/aa.cpp
@ -1172,7 +1172,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
//check cooldown
|
//check cooldown
|
||||||
if(!p_timers.Expired(&database, rank->spell_type + pTimerAAStart)) {
|
if(!p_timers.Expired(&database, rank->spell_type + pTimerAAStart, false)) {
|
||||||
uint32 aaremain = p_timers.GetRemainingTime(rank->spell_type + pTimerAAStart);
|
uint32 aaremain = p_timers.GetRemainingTime(rank->spell_type + pTimerAAStart);
|
||||||
uint32 aaremain_hr = aaremain / (60 * 60);
|
uint32 aaremain_hr = aaremain / (60 * 60);
|
||||||
uint32 aaremain_min = (aaremain / 60) % 60;
|
uint32 aaremain_min = (aaremain / 60) % 60;
|
||||||
@ -1208,6 +1208,17 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
|||||||
if (spells[rank->spell].targettype == ST_Pet || spells[rank->spell].targettype == ST_SummonedPet)
|
if (spells[rank->spell].targettype == ST_Pet || spells[rank->spell].targettype == ST_SummonedPet)
|
||||||
target_id = GetPetID();
|
target_id = GetPetID();
|
||||||
|
|
||||||
|
// extra handling for cast_not_standing spells
|
||||||
|
if (!spells[rank->spell].cast_not_standing) {
|
||||||
|
if (GetAppearance() == eaSitting) // we need to stand!
|
||||||
|
SetAppearance(eaStanding, false);
|
||||||
|
|
||||||
|
if (GetAppearance() != eaStanding) {
|
||||||
|
Message_StringID(MT_SpellFailure, STAND_TO_CAST);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Bards can cast instant cast AAs while they are casting another song
|
// Bards can cast instant cast AAs while they are casting another song
|
||||||
if(spells[rank->spell].cast_time == 0 && GetClass() == BARD && IsBardSong(casting_spell_id)) {
|
if(spells[rank->spell].cast_time == 0 && GetClass() == BARD && IsBardSong(casting_spell_id)) {
|
||||||
if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), EQEmu::CastingSlot::AltAbility, spells[rank->spell].mana, -1, spells[rank->spell].ResistDiff, false)) {
|
if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), EQEmu::CastingSlot::AltAbility, spells[rank->spell].mana, -1, spells[rank->spell].ResistDiff, false)) {
|
||||||
|
|||||||
@ -3692,6 +3692,7 @@ EXTERN_C XS(boot_quest) {
|
|||||||
newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file);
|
newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file);
|
||||||
newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file);
|
newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file);
|
||||||
newXS(strcpy(buf, "get_data"), XS__get_data, file);
|
newXS(strcpy(buf, "get_data"), XS__get_data, file);
|
||||||
|
newXS(strcpy(buf, "get_data_expires"), XS__get_data_expires, file);
|
||||||
newXS(strcpy(buf, "set_data"), XS__set_data, file);
|
newXS(strcpy(buf, "set_data"), XS__set_data, file);
|
||||||
newXS(strcpy(buf, "delete_data"), XS__delete_data, file);
|
newXS(strcpy(buf, "delete_data"), XS__delete_data, file);
|
||||||
newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file);
|
newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file);
|
||||||
|
|||||||
@ -62,7 +62,7 @@ void Mob::CheckFlee() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no special flee_percent check for Gray or Other con rates
|
// If no special flee_percent check for Gray or Other con rates
|
||||||
if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) {
|
if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray) && GetLevel() <= RuleI(Combat, FleeGrayMaxLevel)) {
|
||||||
fleeratio = RuleI(Combat, FleeGrayHPRatio);
|
fleeratio = RuleI(Combat, FleeGrayHPRatio);
|
||||||
} else if(fleeratio == 0) {
|
} else if(fleeratio == 0) {
|
||||||
fleeratio = RuleI(Combat, FleeHPRatio );
|
fleeratio = RuleI(Combat, FleeHPRatio );
|
||||||
|
|||||||
@ -1680,6 +1680,7 @@ luabind::scope lua_register_general() {
|
|||||||
luabind::def("say_link", (std::string(*)(const char*,bool))&lua_say_link),
|
luabind::def("say_link", (std::string(*)(const char*,bool))&lua_say_link),
|
||||||
luabind::def("say_link", (std::string(*)(const char*))&lua_say_link),
|
luabind::def("say_link", (std::string(*)(const char*))&lua_say_link),
|
||||||
luabind::def("get_data", (std::string(*)(std::string))&lua_get_data),
|
luabind::def("get_data", (std::string(*)(std::string))&lua_get_data),
|
||||||
|
luabind::def("get_data_expires", (std::string(*)(std::string))&lua_get_data_expires),
|
||||||
luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data),
|
luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data),
|
||||||
luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data),
|
luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data),
|
||||||
luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data),
|
luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data),
|
||||||
|
|||||||
@ -418,6 +418,7 @@
|
|||||||
#define NO_LONGER_HIDDEN 12337 //You are no longer hidden.
|
#define NO_LONGER_HIDDEN 12337 //You are no longer hidden.
|
||||||
#define STOP_SNEAKING 12338 //You stop sneaking
|
#define STOP_SNEAKING 12338 //You stop sneaking
|
||||||
#define NOT_IN_CONTROL 12368 //You do not have control of yourself right now.
|
#define NOT_IN_CONTROL 12368 //You do not have control of yourself right now.
|
||||||
|
#define STAND_TO_CAST 12441 //You must be standing to cast a spell.
|
||||||
#define ALREADY_CASTING 12442 //You are already casting a spell!
|
#define ALREADY_CASTING 12442 //You are already casting a spell!
|
||||||
#define SHIMMERS_BRIEFLY 12444 //Your %1 shimmers briefly.
|
#define SHIMMERS_BRIEFLY 12444 //Your %1 shimmers briefly.
|
||||||
#define SENSE_CORPSE_NOT_NAME 12446 //You don't sense any corpses of that name.
|
#define SENSE_CORPSE_NOT_NAME 12446 //You don't sense any corpses of that name.
|
||||||
|
|||||||
@ -1295,7 +1295,7 @@ EQEmu::ItemInstance* Client::FindTraderItemBySerialNumber(int32 SerialNumber){
|
|||||||
GetItems_Struct* Client::GetTraderItems(){
|
GetItems_Struct* Client::GetTraderItems(){
|
||||||
|
|
||||||
const EQEmu::ItemInstance* item = nullptr;
|
const EQEmu::ItemInstance* item = nullptr;
|
||||||
uint16 SlotID = 0;
|
uint16 SlotID = INVALID_INDEX;
|
||||||
|
|
||||||
auto gis = new GetItems_Struct;
|
auto gis = new GetItems_Struct;
|
||||||
|
|
||||||
@ -1304,9 +1304,14 @@ GetItems_Struct* Client::GetTraderItems(){
|
|||||||
uint8 ndx = 0;
|
uint8 ndx = 0;
|
||||||
|
|
||||||
for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) {
|
for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) {
|
||||||
|
if (ndx >= 80)
|
||||||
|
break;
|
||||||
item = this->GetInv().GetItem(i);
|
item = this->GetInv().GetItem(i);
|
||||||
if(item && item->GetItem()->ID == 17899){ //Traders Satchel
|
if(item && item->GetItem()->ID == 17899){ //Traders Satchel
|
||||||
for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) {
|
for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) {
|
||||||
|
if (ndx >= 80)
|
||||||
|
break;
|
||||||
|
|
||||||
SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x);
|
SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x);
|
||||||
|
|
||||||
item = this->GetInv().GetItem(SlotID);
|
item = this->GetInv().GetItem(SlotID);
|
||||||
|
|||||||
@ -1864,26 +1864,22 @@ bool Zone::RemoveSpawnGroup(uint32 in_id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes)
|
||||||
// Added By Hogie
|
{
|
||||||
bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct* npcCorpseDecayTimes) {
|
const std::string query =
|
||||||
|
"SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname";
|
||||||
const std::string query = "SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname";
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (auto row = results.begin(); row != results.end(); ++row, ++index) {
|
for (auto row = results.begin(); row != results.end(); ++row, ++index) {
|
||||||
Seperator sep(row[0]);
|
Seperator sep(row[0]);
|
||||||
npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]);
|
npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]);
|
||||||
npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]);
|
npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]);
|
||||||
|
|
||||||
if (atoi(row[1]) > 7200)
|
npcCorpseDecayTimes[index].seconds = std::min(24 * 60 * 60, atoi(row[1]));
|
||||||
npcCorpseDecayTimes[index].seconds = 720;
|
}
|
||||||
else
|
|
||||||
npcCorpseDecayTimes[index].seconds = atoi(row[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4358,15 +4358,15 @@ uint32 ZoneDatabase::GetCharacterCorpseCount(uint32 char_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) {
|
uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) {
|
||||||
std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u'", char_id);
|
std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u' limit %d, 1", char_id, corpse);
|
||||||
auto results = QueryDatabase(query);
|
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
auto results = QueryDatabase(query);
|
||||||
for (int i = 0; i < corpse; i++) {
|
auto row = results.begin();
|
||||||
return atoul(row[0]);
|
|
||||||
}
|
if (row != results.end())
|
||||||
}
|
return atoul(row[0]);
|
||||||
return 0;
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::GetCharacterCorpseItemCount(uint32 corpse_id){
|
uint32 ZoneDatabase::GetCharacterCorpseItemCount(uint32 corpse_id){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user