mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
Slight tweak (field name) to #983 "Override LEVEL and INT aggro blocking".
If you already ran the previous SQL, use this instead: ALTER TABLE `npc_types` CHANGE `always_aggros_foes` `always_aggro` TINYINT(1) NOT NULL DEFAULT '0';
This commit is contained in:
parent
09e9c0b504
commit
4915e86aba
@ -404,7 +404,7 @@
|
|||||||
9148|2020_01_28_corpse_guild_consent_id.sql|SHOW COLUMNS FROM `character_corpses` LIKE 'guild_consent_id'|empty|
|
9148|2020_01_28_corpse_guild_consent_id.sql|SHOW COLUMNS FROM `character_corpses` LIKE 'guild_consent_id'|empty|
|
||||||
9149|2020_02_06_globalloot.sql|SHOW COLUMNS FROM `global_loot` LIKE 'hot_zone'|empty|
|
9149|2020_02_06_globalloot.sql|SHOW COLUMNS FROM `global_loot` LIKE 'hot_zone'|empty|
|
||||||
9150|2020_02_06_aa_reset_on_death.sql|SHOW COLUMNS FROM `aa_ability` LIKE 'reset_on_death'|empty|
|
9150|2020_02_06_aa_reset_on_death.sql|SHOW COLUMNS FROM `aa_ability` LIKE 'reset_on_death'|empty|
|
||||||
9151|2020_03_05_npc_always_aggro.sql|SHOW COLUMNS FROM `npc_types` LIKE 'always_aggros_foes'|empty|
|
9151|2020_03_05_npc_always_aggro.sql|SHOW COLUMNS FROM `npc_types` LIKE 'always_aggro'|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
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
ALTER TABLE `npc_types` ADD COLUMN `always_aggros_foes` tinyint(4) NOT NULL DEFAULT 0;
|
ALTER TABLE `npc_types` ADD COLUMN `always_aggro` tinyint(1) NOT NULL DEFAULT 0;
|
||||||
|
|||||||
@ -139,7 +139,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
|
|
||||||
if (RuleB(Aggro, UseLevelAggro))
|
if (RuleB(Aggro, UseLevelAggro))
|
||||||
{
|
{
|
||||||
if (GetLevel() < RuleI(Aggro, MinAggroLevel) && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3 && !AlwaysAggrosFoes())
|
if (GetLevel() < RuleI(Aggro, MinAggroLevel) && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3 && !AlwaysAggro())
|
||||||
{
|
{
|
||||||
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2);
|
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2);
|
||||||
return;
|
return;
|
||||||
@ -147,7 +147,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GRAY && !AlwaysAggrosFoes()) {
|
if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GRAY && !AlwaysAggro()) {
|
||||||
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(),
|
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(),
|
||||||
dist2, iAggroRange2);
|
dist2, iAggroRange2);
|
||||||
return;
|
return;
|
||||||
@ -318,7 +318,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
|||||||
//old InZone check taken care of above by !mob->CastToClient()->Connected()
|
//old InZone check taken care of above by !mob->CastToClient()->Connected()
|
||||||
(
|
(
|
||||||
( GetLevel() >= RuleI(Aggro, MinAggroLevel))
|
( GetLevel() >= RuleI(Aggro, MinAggroLevel))
|
||||||
||(GetBodyType() == 3) || AlwaysAggrosFoes()
|
||(GetBodyType() == 3) || AlwaysAggro()
|
||||||
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
|
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
|
||||||
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
|
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
|||||||
//old InZone check taken care of above by !mob->CastToClient()->Connected()
|
//old InZone check taken care of above by !mob->CastToClient()->Connected()
|
||||||
(
|
(
|
||||||
( GetINT() <= RuleI(Aggro, IntAggroThreshold) )
|
( GetINT() <= RuleI(Aggro, IntAggroThreshold) )
|
||||||
|| AlwaysAggrosFoes()
|
|| AlwaysAggro()
|
||||||
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
|
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
|
||||||
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
|
||( mob->GetLevelCon(GetLevel()) != CON_GRAY)
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
|||||||
LogAggro("Dist^2: [{}]\n", dist2);
|
LogAggro("Dist^2: [{}]\n", dist2);
|
||||||
LogAggro("Range^2: [{}]\n", iAggroRange2);
|
LogAggro("Range^2: [{}]\n", iAggroRange2);
|
||||||
LogAggro("Faction: [{}]\n", fv);
|
LogAggro("Faction: [{}]\n", fv);
|
||||||
LogAggro("AlwaysAggroFlag: [{}]\n", AlwaysAggrosFoes());
|
LogAggro("AlwaysAggroFlag: [{}]\n", AlwaysAggro());
|
||||||
LogAggro("Int: [{}]\n", GetINT());
|
LogAggro("Int: [{}]\n", GetINT());
|
||||||
LogAggro("Con: [{}]\n", GetLevelCon(mob->GetLevel()));
|
LogAggro("Con: [{}]\n", GetLevelCon(mob->GetLevel()));
|
||||||
|
|
||||||
|
|||||||
@ -262,7 +262,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
|||||||
0, // uint8 in_legtexture,
|
0, // uint8 in_legtexture,
|
||||||
0, // uint8 in_feettexture,
|
0, // uint8 in_feettexture,
|
||||||
0, // uint8 in_usemodel,
|
0, // uint8 in_usemodel,
|
||||||
0 // bool in_always_aggros_foes
|
0 // bool in_always_aggro
|
||||||
),
|
),
|
||||||
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
corpse_decay_timer(RuleI(Character, CorpseDecayTimeMS)),
|
||||||
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
corpse_rez_timer(RuleI(Character, CorpseResTimeMS)),
|
||||||
|
|||||||
@ -94,7 +94,7 @@ Mob::Mob(
|
|||||||
uint8 in_legtexture,
|
uint8 in_legtexture,
|
||||||
uint8 in_feettexture,
|
uint8 in_feettexture,
|
||||||
uint16 in_usemodel,
|
uint16 in_usemodel,
|
||||||
bool in_always_aggros_foes
|
bool in_always_aggro
|
||||||
) :
|
) :
|
||||||
attack_timer(2000),
|
attack_timer(2000),
|
||||||
attack_dw_timer(2000),
|
attack_dw_timer(2000),
|
||||||
@ -276,7 +276,7 @@ Mob::Mob(
|
|||||||
qglobal = 0;
|
qglobal = 0;
|
||||||
spawned = false;
|
spawned = false;
|
||||||
rare_spawn = false;
|
rare_spawn = false;
|
||||||
always_aggros_foes = in_always_aggros_foes;
|
always_aggro = in_always_aggro;
|
||||||
|
|
||||||
InitializeBuffSlots();
|
InitializeBuffSlots();
|
||||||
|
|
||||||
|
|||||||
@ -579,7 +579,7 @@ public:
|
|||||||
inline const GravityBehavior GetFlyMode() const { return flymode; }
|
inline const GravityBehavior GetFlyMode() const { return flymode; }
|
||||||
bool IsBoat() const;
|
bool IsBoat() const;
|
||||||
bool IsControllableBoat() const;
|
bool IsControllableBoat() const;
|
||||||
inline const bool AlwaysAggrosFoes() const { return always_aggros_foes; }
|
inline const bool AlwaysAggro() const { return always_aggro; }
|
||||||
|
|
||||||
//Group
|
//Group
|
||||||
virtual bool HasRaid() = 0;
|
virtual bool HasRaid() = 0;
|
||||||
@ -1391,7 +1391,7 @@ protected:
|
|||||||
Timer ranged_timer;
|
Timer ranged_timer;
|
||||||
float attack_speed; //% increase/decrease in attack speed (not haste)
|
float attack_speed; //% increase/decrease in attack speed (not haste)
|
||||||
int attack_delay; //delay between attacks in 10ths of seconds
|
int attack_delay; //delay between attacks in 10ths of seconds
|
||||||
bool always_aggros_foes;
|
bool always_aggro;
|
||||||
int16 slow_mitigation; // Allows for a slow mitigation (100 = 100%, 50% = 50%)
|
int16 slow_mitigation; // Allows for a slow mitigation (100 = 100%, 50% = 50%)
|
||||||
Timer tic_timer;
|
Timer tic_timer;
|
||||||
Timer mana_timer;
|
Timer mana_timer;
|
||||||
|
|||||||
@ -114,7 +114,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
|
|||||||
npc_type_data->legtexture,
|
npc_type_data->legtexture,
|
||||||
npc_type_data->feettexture,
|
npc_type_data->feettexture,
|
||||||
npc_type_data->use_model,
|
npc_type_data->use_model,
|
||||||
npc_type_data->always_aggros_foes
|
npc_type_data->always_aggro
|
||||||
),
|
),
|
||||||
attacked_timer(CombatEventTimer_expire),
|
attacked_timer(CombatEventTimer_expire),
|
||||||
swarm_timer(100),
|
swarm_timer(100),
|
||||||
|
|||||||
@ -2507,7 +2507,7 @@ const NPCType *ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
|||||||
"npc_types.stuck_behavior, "
|
"npc_types.stuck_behavior, "
|
||||||
"npc_types.model, "
|
"npc_types.model, "
|
||||||
"npc_types.flymode, "
|
"npc_types.flymode, "
|
||||||
"npc_types.always_aggros_foes "
|
"npc_types.always_aggro "
|
||||||
"FROM npc_types %s",
|
"FROM npc_types %s",
|
||||||
where_condition.c_str()
|
where_condition.c_str()
|
||||||
);
|
);
|
||||||
@ -2709,7 +2709,7 @@ const NPCType *ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
|||||||
temp_npctype_data->stuck_behavior = atoi(row[109]);
|
temp_npctype_data->stuck_behavior = atoi(row[109]);
|
||||||
temp_npctype_data->use_model = atoi(row[110]);
|
temp_npctype_data->use_model = atoi(row[110]);
|
||||||
temp_npctype_data->flymode = atoi(row[111]);
|
temp_npctype_data->flymode = atoi(row[111]);
|
||||||
temp_npctype_data->always_aggros_foes = atoi(row[112]);
|
temp_npctype_data->always_aggro = atoi(row[112]);
|
||||||
|
|
||||||
temp_npctype_data->skip_auto_scale = false; // hardcoded here for now
|
temp_npctype_data->skip_auto_scale = false; // hardcoded here for now
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ struct NPCType
|
|||||||
int8 stuck_behavior;
|
int8 stuck_behavior;
|
||||||
uint16 use_model;
|
uint16 use_model;
|
||||||
int8 flymode;
|
int8 flymode;
|
||||||
bool always_aggros_foes;
|
bool always_aggro;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace player_lootitem {
|
namespace player_lootitem {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user