mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-30 15:55:45 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 87cb74b851 | |||
| 26c267db1b | |||
| 99f8e6cef5 | |||
| b6917ec782 | |||
| eb51550109 | |||
| 9d1ace627c | |||
| ec3ef411a1 | |||
| 1394b6a4d2 | |||
| 7f41547963 | |||
| 2e4071cdcf |
@@ -1,3 +1,29 @@
|
||||
## [22.8.1] - 03/27/2023
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix for NPCs having spells interrupted. ([#3150](https://github.com/EQEmu/Server/pull/3150)) @Aeadoin 2023-03-27
|
||||
|
||||
## [22.8.0] - 03/25/2023
|
||||
|
||||
### Code
|
||||
|
||||
* Cleanup Strings::ToInt uses. ([#3142](https://github.com/EQEmu/Server/pull/3142)) @Aeadoin 2023-03-26
|
||||
* Remove extern bool Critical ([#3146](https://github.com/EQEmu/Server/pull/3146)) @Kinglykrab 2023-03-25
|
||||
|
||||
### Crash
|
||||
|
||||
* Fix for crash in Raid::QueuePacket ([#3145](https://github.com/EQEmu/Server/pull/3145)) @Aeadoin 2023-03-25
|
||||
|
||||
### Feature
|
||||
|
||||
* Add support for -1 extradmgskill to allow all skills to be scaled. ([#3136](https://github.com/EQEmu/Server/pull/3136)) @Kinglykrab 2023-03-26
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix for Items looted from corpses. ([#3147](https://github.com/EQEmu/Server/pull/3147)) @Aeadoin 2023-03-26
|
||||
* Fix for SQL Query in npc_scale_global_base ([#3144](https://github.com/EQEmu/Server/pull/3144)) @Aeadoin 2023-03-26
|
||||
|
||||
## [22.7.0] - 03/24/2023
|
||||
|
||||
### Bots
|
||||
|
||||
+1
-1
@@ -812,7 +812,7 @@ uint32 Database::GetAccountIDByChar(const char* charname, uint32* oCharID) {
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
uint32 accountId = Strings::ToInt(row[0]);
|
||||
uint32 accountId = Strings::ToUnsignedInt(row[0]);
|
||||
|
||||
if (oCharID)
|
||||
*oCharID = Strings::ToUnsignedInt(row[1]);
|
||||
|
||||
@@ -499,7 +499,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
ExtendedProfile_Struct* e_pp;
|
||||
uint32 pplen = 0;
|
||||
uint32 i;
|
||||
int character_id = 0;
|
||||
uint32 character_id = 0;
|
||||
int account_id = 0;
|
||||
int number_of_characters = 0;
|
||||
int printppdebug = 0; /* Prints Player Profile */
|
||||
@@ -929,12 +929,12 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
char_iter_count++;
|
||||
squery = StringFormat("SELECT `id`, `profile`, `name`, `level`, `account_id`, `firstlogon`, `lfg`, `lfp`, `mailkey`, `xtargets`, `inspectmessage`, `extprofile` FROM `character_` WHERE `id` = %i", Strings::ToInt(row[0]));
|
||||
squery = StringFormat("SELECT `id`, `profile`, `name`, `level`, `account_id`, `firstlogon`, `lfg`, `lfp`, `mailkey`, `xtargets`, `inspectmessage`, `extprofile` FROM `character_` WHERE `id` = %i", Strings::ToUnsignedInt(row[0]));
|
||||
auto results2 = QueryDatabase(squery);
|
||||
auto row2 = results2.begin();
|
||||
pp = (Convert::PlayerProfile_Struct*)row2[1];
|
||||
e_pp = (ExtendedProfile_Struct*)row2[11];
|
||||
character_id = Strings::ToInt(row[0]);
|
||||
character_id = Strings::ToUnsignedInt(row[0]);
|
||||
account_id = Strings::ToInt(row2[4]);
|
||||
/* Convert some data from the character_ table that is still relevant */
|
||||
firstlogon = Strings::ToUnsignedInt(row2[5]);
|
||||
|
||||
@@ -5524,9 +5524,9 @@ struct ServerLootItem_Struct {
|
||||
uint32 aug_6; // uint32 aug_5;
|
||||
bool attuned;
|
||||
std::string custom_data;
|
||||
uint32 ornamenticon;
|
||||
uint32 ornamentidfile;
|
||||
uint32 ornament_hero_model;
|
||||
uint32 ornamenticon {};
|
||||
uint32 ornamentidfile {};
|
||||
uint32 ornament_hero_model {};
|
||||
uint16 trivial_min_level;
|
||||
uint16 trivial_max_level;
|
||||
uint16 npc_min_level;
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace PlayerEvent {
|
||||
};
|
||||
|
||||
struct AAPurchasedEvent {
|
||||
int32 aa_id;
|
||||
uint32 aa_id;
|
||||
int32 aa_cost;
|
||||
int32 aa_previous_id;
|
||||
int32 aa_next_id;
|
||||
|
||||
+3
-3
@@ -131,7 +131,7 @@ namespace EQ
|
||||
Mounts?
|
||||
Ornamentations?
|
||||
GuildBanners?
|
||||
Collectible?
|
||||
Collectible?
|
||||
Placeable?
|
||||
(others?)
|
||||
*/
|
||||
@@ -449,8 +449,8 @@ namespace EQ
|
||||
int8 Shielding; // PoP: Shielding %
|
||||
int8 StunResist; // PoP: Stun Resist %
|
||||
int8 StrikeThrough; // PoP: Strike Through %
|
||||
uint32 ExtraDmgSkill;
|
||||
uint32 ExtraDmgAmt;
|
||||
int32 ExtraDmgSkill;
|
||||
int32 ExtraDmgAmt;
|
||||
int8 SpellShield; // PoP: Spell Shield %
|
||||
int8 Avoidance; // PoP: Avoidance +
|
||||
int8 Accuracy; // PoP: Accuracy +
|
||||
|
||||
+6
-6
@@ -964,10 +964,10 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
|
||||
// Flags
|
||||
item.ArtifactFlag = Strings::ToBool(row[ItemField::artifactflag]);
|
||||
item.Attuneable = !disable_attuneable && Strings::ToInt(row[ItemField::attuneable]) != 0;
|
||||
item.BenefitFlag = Strings::ToBool(row[ItemField::benefitflag]) != 0;
|
||||
item.FVNoDrop = Strings::ToInt(row[ItemField::fvnodrop]) != 0;
|
||||
item.Magic = Strings::ToBool(row[ItemField::magic]) != 0;
|
||||
item.Attuneable = !disable_attuneable && Strings::ToBool(row[ItemField::attuneable]);
|
||||
item.BenefitFlag = Strings::ToBool(row[ItemField::benefitflag]);
|
||||
item.FVNoDrop = Strings::ToBool(row[ItemField::fvnodrop]);
|
||||
item.Magic = Strings::ToBool(row[ItemField::magic]);
|
||||
item.NoDrop = disable_no_drop ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::nodrop]));
|
||||
item.NoPet = !disable_no_pet && Strings::ToBool(row[ItemField::nopet]);
|
||||
item.NoRent = disable_no_rent ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::norent]));
|
||||
@@ -1107,8 +1107,8 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
item.SkillModType = Strings::ToUnsignedInt(row[ItemField::skillmodtype]);
|
||||
|
||||
// Extra Damage Skill
|
||||
item.ExtraDmgSkill = Strings::ToUnsignedInt(row[ItemField::extradmgskill]);
|
||||
item.ExtraDmgAmt = Strings::ToUnsignedInt(row[ItemField::extradmgamt]);
|
||||
item.ExtraDmgSkill = Strings::ToInt(row[ItemField::extradmgskill]);
|
||||
item.ExtraDmgAmt = Strings::ToInt(row[ItemField::extradmgamt]);
|
||||
|
||||
// Bard
|
||||
item.BardType = Strings::ToUnsignedInt(row[ItemField::bardtype]);
|
||||
|
||||
+20
-2
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -260,13 +260,31 @@ const std::map<EQ::skills::SkillType, std::string>& EQ::skills::GetSkillTypeMap(
|
||||
return skill_type_map;
|
||||
}
|
||||
|
||||
const std::vector<EQ::skills::SkillType>& EQ::skills::GetExtraDamageSkills()
|
||||
{
|
||||
static const std::vector<EQ::skills::SkillType> v = {
|
||||
EQ::skills::SkillBackstab,
|
||||
EQ::skills::SkillBash,
|
||||
EQ::skills::SkillDragonPunch, // Same ID as Tail Rake
|
||||
EQ::skills::SkillEagleStrike,
|
||||
EQ::skills::SkillFlyingKick,
|
||||
EQ::skills::SkillKick,
|
||||
EQ::skills::SkillRoundKick,
|
||||
EQ::skills::SkillRoundKick,
|
||||
EQ::skills::SkillTigerClaw,
|
||||
EQ::skills::SkillFrenzy
|
||||
};
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
std::string EQ::skills::GetSkillName(SkillType skill)
|
||||
{
|
||||
if (skill >= Skill1HBlunt && skill <= Skill2HPiercing) {
|
||||
auto skills = GetSkillTypeMap();
|
||||
return skills[skill];
|
||||
}
|
||||
return std::string();
|
||||
return {};
|
||||
}
|
||||
|
||||
EQ::SkillProfile::SkillProfile()
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace EQ
|
||||
@@ -170,6 +171,7 @@ namespace EQ
|
||||
bool IsMeleeDmg(SkillType skill);
|
||||
|
||||
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
||||
extern const std::vector<SkillType>& GetExtraDamageSkills();
|
||||
|
||||
std::string GetSkillName(SkillType skill);
|
||||
} /*skills*/
|
||||
@@ -305,7 +307,7 @@ namespace EQ
|
||||
|
||||
uint32 operator[](int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
||||
};
|
||||
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_SKILLS_H*/
|
||||
|
||||
+2
-2
@@ -504,7 +504,7 @@ enum SpellRestriction
|
||||
HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, //
|
||||
IS_HP_ABOVE_50_PCT = 16010, //
|
||||
IS_HP_UNDER_50_PCT = 16031, //
|
||||
IS_OFF_HAND_EQUIPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
|
||||
IS_OFF_HAND_EQUIPPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
|
||||
HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction |
|
||||
HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon.
|
||||
IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana.
|
||||
@@ -1211,7 +1211,7 @@ typedef enum {
|
||||
#define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front
|
||||
#define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner
|
||||
#define SE_Trigger_Spell_Non_Item 475 // implemented - Trigger spell on cast only if not from item click.
|
||||
#define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Duel Wield is equiped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none
|
||||
#define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Dual Wield is equipped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none
|
||||
#define SE_Hatelist_To_Top_Index 477 // Implemented - Chance to be set to top of rampage list
|
||||
#define SE_Hatelist_To_Tail_Index 478 // Implemented - Chance to be set to bottom of rampage list
|
||||
#define SE_Ff_Value_Min 479 // implemented, @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
// Build variables
|
||||
// these get injected during the build pipeline
|
||||
#define CURRENT_VERSION "22.7.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define CURRENT_VERSION "22.8.1-dev" // always append -dev to the current version for custom-builds
|
||||
#define LOGIN_VERSION "0.8.0"
|
||||
#define COMPILE_DATE __DATE__
|
||||
#define COMPILE_TIME __TIME__
|
||||
@@ -42,7 +42,7 @@
|
||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9226
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9227
|
||||
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9038
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Database::Database(
|
||||
user.c_str(),
|
||||
pass.c_str(),
|
||||
name.c_str(),
|
||||
Strings::ToInt(port),
|
||||
Strings::ToUnsignedInt(port),
|
||||
&errnum,
|
||||
errbuf
|
||||
)
|
||||
@@ -93,7 +93,7 @@ bool Database::GetLoginDataFromAccountInfo(
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
id = Strings::ToInt(row[0]);
|
||||
id = Strings::ToUnsignedInt(row[0]);
|
||||
password = row[1];
|
||||
|
||||
LogDebug(
|
||||
@@ -145,7 +145,7 @@ bool Database::GetLoginTokenDataFromToken(
|
||||
}
|
||||
|
||||
if (strcmp(row[2], "login_server_id") == 0) {
|
||||
db_account_id = Strings::ToInt(row[3]);
|
||||
db_account_id = Strings::ToUnsignedInt(row[3]);
|
||||
found_login_id = true;
|
||||
continue;
|
||||
}
|
||||
@@ -373,7 +373,7 @@ Database::DbWorldRegistration Database::GetWorldRegistration(
|
||||
r.server_list_type = Strings::ToInt(row[3]);
|
||||
r.is_server_trusted = Strings::ToInt(row[2]) > 0;
|
||||
r.server_list_description = row[4];
|
||||
r.server_admin_id = Strings::ToInt(row[5]);
|
||||
r.server_admin_id = Strings::ToUnsignedInt(row[5]);
|
||||
|
||||
if (r.server_admin_id <= 0) {
|
||||
return r;
|
||||
@@ -513,7 +513,7 @@ bool Database::CreateWorldRegistration(
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
id = Strings::ToInt(row[0]);
|
||||
id = Strings::ToUnsignedInt(row[0]);
|
||||
auto insert_query = fmt::format(
|
||||
"INSERT INTO login_world_servers SET id = {0}, long_name = '{1}', short_name = '{2}', last_ip_address = '{3}', \n"
|
||||
"login_server_list_type_id = 3, login_server_admin_id = {4}, is_server_trusted = 0, tag_description = ''",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eqemu-server",
|
||||
"version": "22.7.0",
|
||||
"version": "22.8.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EQEmu/Server.git"
|
||||
|
||||
@@ -480,6 +480,7 @@
|
||||
9224|2023_03_08_npc_scale_global_base_avoidance.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'hp_regen_per_second'|empty|
|
||||
9225|2023_01_21_bots_raid_members.sql|SHOW COLUMNS FROM `raid_members` LIKE 'bot_id'|empty|
|
||||
9226|2023_03_17_corpse_fields.sql|SHOW COLUMNS FROM `character_corpse_items` LIKE 'custom_data'|empty|
|
||||
9227|2023_03_24_npc_scale_global_base_verify.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'heroic_strikethrough'|not_empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@@ -51,5 +51,5 @@ ALTER TABLE `npc_scale_global_base`
|
||||
MODIFY COLUMN `attack_delay` int(11) NOT NULL DEFAULT 0 AFTER `hp_regen_rate`,
|
||||
MODIFY COLUMN `spell_scale` int(11) NOT NULL DEFAULT 100 AFTER `attack_delay`,
|
||||
MODIFY COLUMN `heal_scale` int(11) NOT NULL DEFAULT 100 AFTER `spell_scale`,
|
||||
MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' AFTER `heal_scale`,
|
||||
MODIFY COLUMN special_abilities text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER heal_scale,
|
||||
ADD COLUMN `heroic_strikethrough` int(11) NOT NULL DEFAULT 0 AFTER `heal_scale`;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
UPDATE `npc_scale_global_base` SET ac = 0 WHERE ac IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET hp = 0 WHERE hp IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET accuracy = 0 WHERE accuracy IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET slow_mitigation = 0 WHERE slow_mitigation IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET attack = 0 WHERE attack IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET strength = 0 WHERE strength IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET stamina = 0 WHERE stamina IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET dexterity = 0 WHERE dexterity IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET agility = 0 WHERE agility IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET intelligence = 0 WHERE intelligence IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET wisdom = 0 WHERE wisdom IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET charisma = 0 WHERE charisma IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET magic_resist = 0 WHERE magic_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET cold_resist = 0 WHERE cold_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET fire_resist = 0 WHERE fire_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET poison_resist = 0 WHERE poison_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET disease_resist = 0 WHERE disease_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET corruption_resist = 0 WHERE corruption_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET physical_resist = 0 WHERE physical_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET min_dmg = 0 WHERE min_dmg IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET max_dmg = 0 WHERE max_dmg IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET hp_regen_rate = 0 WHERE hp_regen_rate IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET attack_delay = 0 WHERE attack_delay IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET physical_resist = 0 WHERE physical_resist IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET spell_scale = 100 WHERE spell_scale IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET heal_scale = 100 WHERE heal_scale IS NULL;
|
||||
UPDATE `npc_scale_global_base` SET special_abilities = '' WHERE special_abilities IS NULL;
|
||||
ALTER TABLE `npc_scale_global_base`
|
||||
MODIFY COLUMN `ac` int(11) NOT NULL DEFAULT 0 AFTER `instance_version_list`,
|
||||
MODIFY COLUMN `hp` bigint(20) NOT NULL DEFAULT 0 AFTER `ac`,
|
||||
MODIFY COLUMN `accuracy` int(11) NOT NULL DEFAULT 0 AFTER `hp`,
|
||||
MODIFY COLUMN `slow_mitigation` int(11) NOT NULL DEFAULT 0 AFTER `accuracy`,
|
||||
MODIFY COLUMN `attack` int(11) NOT NULL DEFAULT 0 AFTER `slow_mitigation`,
|
||||
MODIFY COLUMN `strength` int(11) NOT NULL DEFAULT 0 AFTER `attack`,
|
||||
MODIFY COLUMN `stamina` int(11) NOT NULL DEFAULT 0 AFTER `strength`,
|
||||
MODIFY COLUMN `dexterity` int(11) NOT NULL DEFAULT 0 AFTER `stamina`,
|
||||
MODIFY COLUMN `agility` int(11) NOT NULL DEFAULT 0 AFTER `dexterity`,
|
||||
MODIFY COLUMN `intelligence` int(11) NOT NULL DEFAULT 0 AFTER `agility`,
|
||||
MODIFY COLUMN `wisdom` int(11) NOT NULL DEFAULT 0 AFTER `intelligence`,
|
||||
MODIFY COLUMN `charisma` int(11) NOT NULL DEFAULT 0 AFTER `wisdom`,
|
||||
MODIFY COLUMN `magic_resist` int(11) NOT NULL DEFAULT 0 AFTER `charisma`,
|
||||
MODIFY COLUMN `cold_resist` int(11) NOT NULL DEFAULT 0 AFTER `magic_resist`,
|
||||
MODIFY COLUMN `fire_resist` int(11) NOT NULL DEFAULT 0 AFTER `cold_resist`,
|
||||
MODIFY COLUMN `poison_resist` int(11) NOT NULL DEFAULT 0 AFTER `fire_resist`,
|
||||
MODIFY COLUMN `disease_resist` int(11) NOT NULL DEFAULT 0 AFTER `poison_resist`,
|
||||
MODIFY COLUMN `corruption_resist` int(11) NOT NULL DEFAULT 0 AFTER `disease_resist`,
|
||||
MODIFY COLUMN `physical_resist` int(11) NOT NULL DEFAULT 0 AFTER `corruption_resist`,
|
||||
MODIFY COLUMN `min_dmg` int(11) NOT NULL DEFAULT 0 AFTER `physical_resist`,
|
||||
MODIFY COLUMN `max_dmg` int(11) NOT NULL DEFAULT 0 AFTER `min_dmg`,
|
||||
MODIFY COLUMN `hp_regen_rate` bigint(20) NOT NULL DEFAULT 0 AFTER `max_dmg`,
|
||||
MODIFY COLUMN `attack_delay` int(11) NOT NULL DEFAULT 0 AFTER `hp_regen_rate`,
|
||||
MODIFY COLUMN `hp_regen_per_second` bigint(20) NOT NULL DEFAULT 0 AFTER `hp_regen_rate`,
|
||||
MODIFY COLUMN `spell_scale` int(11) NOT NULL DEFAULT 100 AFTER `attack_delay`,
|
||||
MODIFY COLUMN `heal_scale` int(11) NOT NULL DEFAULT 100 AFTER `spell_scale`,
|
||||
MODIFY COLUMN `heroic_strikethrough` int(11) NOT NULL DEFAULT 0 AFTER `avoidance`,
|
||||
MODIFY COLUMN `avoidance` int(11) unsigned NOT NULL DEFAULT 0 AFTER `heal_scale`,
|
||||
MODIFY COLUMN special_abilities text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER heroic_strikethrough;
|
||||
+10
-10
@@ -1448,9 +1448,9 @@ bool ZoneDatabase::LoadAlternateAdvancement(Client *c) {
|
||||
|
||||
int i = 0;
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
uint32 aa = Strings::ToInt(row[0]);
|
||||
uint32 value = Strings::ToInt(row[1]);
|
||||
uint32 charges = Strings::ToInt(row[2]);
|
||||
uint32 aa = Strings::ToUnsignedInt(row[0]);
|
||||
uint32 value = Strings::ToUnsignedInt(row[1]);
|
||||
uint32 charges = Strings::ToUnsignedInt(row[2]);
|
||||
|
||||
auto rank = zone->GetAlternateAdvancementRank(aa);
|
||||
if(!rank) {
|
||||
@@ -1775,7 +1775,7 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
if(results.Success()) {
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
auto ability = new AA::Ability;
|
||||
ability->id = Strings::ToInt(row[0]);
|
||||
ability->id = Strings::ToUnsignedInt(row[0]);
|
||||
ability->name = row[1];
|
||||
ability->category = Strings::ToInt(row[2]);
|
||||
//EQ client has classes left shifted by one bit for some odd reason
|
||||
@@ -1786,8 +1786,8 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
ability->status = Strings::ToInt(row[7]);
|
||||
ability->type = Strings::ToInt(row[8]);
|
||||
ability->charges = Strings::ToInt(row[9]);
|
||||
ability->grant_only = Strings::ToInt(row[10]) != 0 ? true : false;
|
||||
ability->reset_on_death = Strings::ToInt(row[11]) != 0 ? true : false;
|
||||
ability->grant_only = Strings::ToBool(row[10]);
|
||||
ability->reset_on_death = Strings::ToBool(row[11]);
|
||||
ability->first_rank_id = Strings::ToInt(row[12]);
|
||||
ability->first = nullptr;
|
||||
|
||||
@@ -1814,7 +1814,7 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
if(results.Success()) {
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
auto rank = new AA::Rank;
|
||||
rank->id = Strings::ToInt(row[0]);
|
||||
rank->id = Strings::ToUnsignedInt(row[0]);
|
||||
rank->upper_hotkey_sid = Strings::ToInt(row[1]);
|
||||
rank->lower_hotkey_sid = Strings::ToInt(row[2]);
|
||||
rank->title_sid = Strings::ToInt(row[3]);
|
||||
@@ -1846,8 +1846,8 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
if(results.Success()) {
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
AA::RankEffect effect;
|
||||
int rank_id = Strings::ToInt(row[0]);
|
||||
effect.slot = Strings::ToInt(row[1]);
|
||||
uint32 rank_id = Strings::ToUnsignedInt(row[0]);
|
||||
effect.slot = Strings::ToUnsignedInt(row[1]);
|
||||
effect.effect_id = Strings::ToInt(row[2]);
|
||||
effect.base_value = Strings::ToInt(row[3]);
|
||||
effect.limit_value = Strings::ToInt(row[4]);
|
||||
@@ -1871,7 +1871,7 @@ bool ZoneDatabase::LoadAlternateAdvancementAbilities(std::unordered_map<int, std
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success()) {
|
||||
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||
int rank_id = Strings::ToInt(row[0]);
|
||||
uint32 rank_id = Strings::ToUnsignedInt(row[0]);
|
||||
int aa_id = Strings::ToInt(row[1]);
|
||||
int points = Strings::ToInt(row[2]);
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public:
|
||||
Rank *GetRankByPointsSpent(int current_level);
|
||||
int GetMaxLevel(Mob *who);
|
||||
|
||||
int id;
|
||||
uint32 id;
|
||||
std::string name;
|
||||
int category;
|
||||
int classes;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public:
|
||||
Rank() { }
|
||||
~Rank() { }
|
||||
|
||||
int id;
|
||||
uint32 id;
|
||||
int upper_hotkey_sid;
|
||||
int lower_hotkey_sid;
|
||||
int title_sid;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace AA
|
||||
|
||||
struct RankEffect
|
||||
{
|
||||
int slot;
|
||||
uint32 slot;
|
||||
int effect_id;
|
||||
int base_value;
|
||||
int limit_value;
|
||||
|
||||
+171
-171
@@ -402,177 +402,177 @@ Json::Value ApiGetMobListDetail(EQ::Net::WebsocketServerConnection *connection,
|
||||
/**
|
||||
* Rest
|
||||
*/
|
||||
row["ac"] = mob->GetAC();
|
||||
row["ac_softcap"] = mob->GetACSoftcap();
|
||||
row["ac_sum"] = mob->ACSum();
|
||||
row["active_light_type"] = mob->GetActiveLightType();
|
||||
row["aggro_range"] = mob->GetAggroRange();
|
||||
row["allow_beneficial"] = mob->GetAllowBeneficial();
|
||||
row["animation"] = mob->GetAnimation();
|
||||
row["assist_range"] = mob->GetAssistRange();
|
||||
row["aura_slots"] = mob->GetAuraSlots();
|
||||
row["base_fear_speed"] = mob->GetBaseFearSpeed();
|
||||
row["base_runspeed"] = mob->GetBaseRunspeed();
|
||||
row["base_size"] = mob->GetBaseSize();
|
||||
row["base_walkspeed"] = mob->GetBaseWalkspeed();
|
||||
row["beard"] = mob->GetBeard();
|
||||
row["beard_color"] = mob->GetBeardColor();
|
||||
row["best_melee_skill"] = mob->GetBestMeleeSkill();
|
||||
row["calc_fear_resist_chance"] = mob->CalcFearResistChance();
|
||||
row["calc_resist_chance_bonus"] = mob->CalcResistChanceBonus();
|
||||
row["can_block_spell"] = mob->CanBlockSpell();
|
||||
row["can_facestab"] = mob->CanFacestab();
|
||||
row["casted_spell_inv_slot"] = mob->GetCastedSpellInvSlot();
|
||||
row["casting_spell_id"] = mob->CastingSpellID();
|
||||
row["charmed"] = mob->Charmed();
|
||||
row["check_last_los_state"] = mob->CheckLastLosState();
|
||||
row["class"] = mob->GetClass();
|
||||
row["class_level_factor"] = mob->GetClassLevelFactor();
|
||||
row["class_race_ac_bonus"] = mob->GetClassRaceACBonus();
|
||||
row["compute_defense"] = mob->compute_defense();
|
||||
row["count_dispellable_buffs"] = mob->CountDispellableBuffs();
|
||||
row["cripp_blow_chance"] = mob->GetCrippBlowChance();
|
||||
row["cur_wp"] = mob->GetCurWp();
|
||||
row["cwp"] = mob->GetCWP();
|
||||
row["cwpp"] = mob->GetCWPP();
|
||||
row["divine_aura"] = mob->DivineAura();
|
||||
row["dont_buff_me_before"] = mob->DontBuffMeBefore();
|
||||
row["dont_cure_me_before"] = mob->DontCureMeBefore();
|
||||
row["dont_dot_me_before"] = mob->DontDotMeBefore();
|
||||
row["dont_heal_me_before"] = mob->DontHealMeBefore();
|
||||
row["dont_root_me_before"] = mob->DontRootMeBefore();
|
||||
row["dont_snare_me_before"] = mob->DontSnareMeBefore();
|
||||
row["drakkin_details"] = mob->GetDrakkinDetails();
|
||||
row["drakkin_heritage"] = mob->GetDrakkinHeritage();
|
||||
row["drakkin_tattoo"] = mob->GetDrakkinTattoo();
|
||||
row["emote_id"] = mob->GetEmoteID();
|
||||
row["equipment_light_type"] = mob->GetEquipmentLightType();
|
||||
row["eye_color1"] = mob->GetEyeColor1();
|
||||
row["eye_color2"] = mob->GetEyeColor2();
|
||||
row["fear_speed"] = mob->GetFearSpeed();
|
||||
row["flurry_chance"] = mob->GetFlurryChance();
|
||||
row["follow_can_run"] = mob->GetFollowCanRun();
|
||||
row["follow_distance"] = mob->GetFollowDistance();
|
||||
row["follow_id"] = mob->GetFollowID();
|
||||
row["gender"] = mob->GetGender();
|
||||
row["hair_color"] = mob->GetHairColor();
|
||||
row["hair_style"] = mob->GetHairStyle();
|
||||
row["has_active_song"] = mob->HasActiveSong();
|
||||
row["has_assist_aggro"] = mob->HasAssistAggro();
|
||||
row["has_died"] = mob->HasDied();
|
||||
row["has_disc_buff"] = mob->HasDiscBuff();
|
||||
row["has_endur_upkeep"] = mob->HasEndurUpkeep();
|
||||
row["has_free_aura_slots"] = mob->HasFreeAuraSlots();
|
||||
row["has_free_trap_slots"] = mob->HasFreeTrapSlots();
|
||||
row["has_mgb"] = mob->HasMGB();
|
||||
row["has_numhits"] = mob->HasNumhits();
|
||||
row["has_pet"] = mob->HasPet();
|
||||
row["has_pet_affinity"] = mob->HasPetAffinity();
|
||||
row["has_primary_aggro"] = mob->HasPrimaryAggro();
|
||||
row["has_project_illusion"] = mob->HasProjectIllusion();
|
||||
row["has_projectile_attack"] = mob->HasProjectileAttack();
|
||||
row["has_shield_equiped"] = mob->HasShieldEquiped();
|
||||
row["has_special_abilities"] = mob->HasSpecialAbilities();
|
||||
row["has_tar_reflection"] = mob->HasTargetReflection();
|
||||
row["has_temp_pets_active"] = mob->HasTempPetsActive();
|
||||
row["has_two_hand_blunt_equiped"] = mob->HasTwoHandBluntEquiped();
|
||||
row["has_two_hander_equipped"] = mob->HasTwoHanderEquipped();
|
||||
row["hate_summon"] = mob->HateSummon();
|
||||
row["helm_texture"] = mob->GetHelmTexture();
|
||||
row["hp"] = mob->GetHP();
|
||||
row["improved_taunt"] = mob->ImprovedTaunt();
|
||||
row["innate_light_type"] = mob->GetInnateLightType();
|
||||
row["is_ai_controlled"] = mob->IsAIControlled();
|
||||
row["is_amnesiad"] = mob->IsAmnesiad();
|
||||
row["is_animation"] = mob->IsAnimation();
|
||||
row["is_blind"] = mob->IsBlind();
|
||||
row["is_casting"] = mob->IsCasting();
|
||||
row["is_charmed"] = mob->IsCharmed();
|
||||
row["is_destructible_object"] = mob->IsDestructibleObject();
|
||||
row["is_engaged"] = mob->IsEngaged();
|
||||
row["is_enraged"] = mob->IsEnraged();
|
||||
row["is_familiar"] = mob->IsFamiliar();
|
||||
row["is_feared"] = mob->IsFeared();
|
||||
row["is_findable"] = mob->IsFindable();
|
||||
row["is_focused"] = mob->IsFocused();
|
||||
row["is_g_held"] = mob->IsGHeld();
|
||||
row["is_grouped"] = mob->IsGrouped();
|
||||
row["is_held"] = mob->IsHeld();
|
||||
row["is_looting"] = mob->IsLooting();
|
||||
row["is_melee_disabled"] = mob->IsMeleeDisabled();
|
||||
row["is_mezzed"] = mob->IsMezzed();
|
||||
row["is_moved"] = mob->IsMoved();
|
||||
row["is_moving"] = mob->IsMoving();
|
||||
row["is_no_cast"] = mob->IsNoCast();
|
||||
row["is_off_hand_atk"] = mob->IsOffHandAtk();
|
||||
row["is_pet_owner_client"] = mob->IsPetOwnerClient();
|
||||
row["is_pet_regroup"] = mob->IsPetRegroup();
|
||||
row["is_pet_stop"] = mob->IsPetStop();
|
||||
row["is_pseudo_rooted"] = mob->IsPseudoRooted();
|
||||
row["is_raid_grouped"] = mob->IsRaidGrouped();
|
||||
row["is_rare_spawn"] = mob->IsRareSpawn();
|
||||
row["is_roamer"] = mob->IsRoamer();
|
||||
row["is_rooted"] = mob->IsRooted();
|
||||
row["is_running"] = mob->IsRunning();
|
||||
row["is_silenced"] = mob->IsSilenced();
|
||||
row["is_stunned"] = mob->IsStunned();
|
||||
row["is_tar_lock_pet"] = mob->IsTargetLockPet();
|
||||
row["is_tarable"] = mob->IsTargetable();
|
||||
row["is_tared"] = mob->IsTargeted();
|
||||
row["is_temp_pet"] = mob->IsTempPet();
|
||||
row["is_trackable"] = mob->IsTrackable();
|
||||
row["item_hp_bonuses"] = mob->GetItemHPBonuses();
|
||||
row["last_name"] = mob->GetLastName();
|
||||
row["level"] = mob->GetLevel();
|
||||
row["luclin_face"] = mob->GetLuclinFace();
|
||||
row["mana"] = mob->GetMana();
|
||||
row["mana_percent"] = mob->GetManaPercent();
|
||||
row["mana_ratio"] = mob->GetManaRatio();
|
||||
row["max_hp"] = mob->GetMaxHP();
|
||||
row["max_mana"] = mob->GetMaxMana();
|
||||
row["melee_mitigation"] = mob->GetMeleeMitigation();
|
||||
row["mitigation_ac"] = mob->GetMitigationAC();
|
||||
row["movespeed"] = mob->GetMovespeed();
|
||||
row["name"] = mob->GetName();
|
||||
row["next_hp_event"] = mob->GetNextHPEvent();
|
||||
row["next_inc_hp_event"] = mob->GetNextIncHPEvent();
|
||||
row["npc_assist_cap"] = mob->NPCAssistCap();
|
||||
row["npc_type_id"] = mob->GetNPCTypeID();
|
||||
row["orig_level"] = mob->GetOrigLevel();
|
||||
row["orig_name"] = mob->GetOrigName();
|
||||
row["owner_id"] = mob->GetOwnerID();
|
||||
row["pet_id"] = mob->GetPetID();
|
||||
row["pet_power"] = mob->GetPetPower();
|
||||
row["pet_tar_lock_id"] = mob->GetPetTargetLockID();
|
||||
row["qglobal"] = mob->GetQglobal();
|
||||
row["race"] = mob->GetRace();
|
||||
row["run_anim_speed"] = mob->GetRunAnimSpeed();
|
||||
row["sanctuary"] = mob->Sanctuary();
|
||||
row["see_hide"] = mob->SeeHide();
|
||||
row["see_improved_hide"] = mob->SeeImprovedHide();
|
||||
row["see_invisible"] = mob->SeeInvisible();
|
||||
row["see_invisible_undead"] = mob->SeeInvisibleUndead();
|
||||
row["size"] = mob->GetSize();
|
||||
row["slow_mitigation"] = mob->GetSlowMitigation();
|
||||
row["snared_amount"] = mob->GetSnaredAmount();
|
||||
row["spawned"] = mob->Spawned();
|
||||
row["spell_hp_bonuses"] = mob->GetSpellHPBonuses();
|
||||
row["spell_light_type"] = mob->GetSpellLightType();
|
||||
row["spell_power_distance_mod"] = mob->GetSpellPowerDistanceMod();
|
||||
row["spell_x"] = mob->GetSpellX();
|
||||
row["spell_y"] = mob->GetSpellY();
|
||||
row["spell_z"] = mob->GetSpellZ();
|
||||
row["tar_ring_x"] = mob->GetTargetRingX();
|
||||
row["tar_ring_y"] = mob->GetTargetRingY();
|
||||
row["tar_ring_z"] = mob->GetTargetRingZ();
|
||||
row["temp_pet_count"] = mob->GetTempPetCount();
|
||||
row["texture"] = mob->GetTexture();
|
||||
row["trap_slots"] = mob->GetTrapSlots();
|
||||
row["try_death_save"] = mob->TryDeathSave();
|
||||
row["try_divine_save"] = mob->TryDivineSave();
|
||||
row["try_spell_on_death"] = mob->TrySpellOnDeath();
|
||||
row["update_active_light"] = mob->UpdateActiveLight();
|
||||
row["wander_type"] = mob->GetWanderType();
|
||||
row["ac"] = mob->GetAC();
|
||||
row["ac_softcap"] = mob->GetACSoftcap();
|
||||
row["ac_sum"] = mob->ACSum();
|
||||
row["active_light_type"] = mob->GetActiveLightType();
|
||||
row["aggro_range"] = mob->GetAggroRange();
|
||||
row["allow_beneficial"] = mob->GetAllowBeneficial();
|
||||
row["animation"] = mob->GetAnimation();
|
||||
row["assist_range"] = mob->GetAssistRange();
|
||||
row["aura_slots"] = mob->GetAuraSlots();
|
||||
row["base_fear_speed"] = mob->GetBaseFearSpeed();
|
||||
row["base_runspeed"] = mob->GetBaseRunspeed();
|
||||
row["base_size"] = mob->GetBaseSize();
|
||||
row["base_walkspeed"] = mob->GetBaseWalkspeed();
|
||||
row["beard"] = mob->GetBeard();
|
||||
row["beard_color"] = mob->GetBeardColor();
|
||||
row["best_melee_skill"] = mob->GetBestMeleeSkill();
|
||||
row["calc_fear_resist_chance"] = mob->CalcFearResistChance();
|
||||
row["calc_resist_chance_bonus"] = mob->CalcResistChanceBonus();
|
||||
row["can_block_spell"] = mob->CanBlockSpell();
|
||||
row["can_facestab"] = mob->CanFacestab();
|
||||
row["casted_spell_inv_slot"] = mob->GetCastedSpellInvSlot();
|
||||
row["casting_spell_id"] = mob->CastingSpellID();
|
||||
row["charmed"] = mob->Charmed();
|
||||
row["check_last_los_state"] = mob->CheckLastLosState();
|
||||
row["class"] = mob->GetClass();
|
||||
row["class_level_factor"] = mob->GetClassLevelFactor();
|
||||
row["class_race_ac_bonus"] = mob->GetClassRaceACBonus();
|
||||
row["compute_defense"] = mob->compute_defense();
|
||||
row["count_dispellable_buffs"] = mob->CountDispellableBuffs();
|
||||
row["cripp_blow_chance"] = mob->GetCrippBlowChance();
|
||||
row["cur_wp"] = mob->GetCurWp();
|
||||
row["cwp"] = mob->GetCWP();
|
||||
row["cwpp"] = mob->GetCWPP();
|
||||
row["divine_aura"] = mob->DivineAura();
|
||||
row["dont_buff_me_before"] = mob->DontBuffMeBefore();
|
||||
row["dont_cure_me_before"] = mob->DontCureMeBefore();
|
||||
row["dont_dot_me_before"] = mob->DontDotMeBefore();
|
||||
row["dont_heal_me_before"] = mob->DontHealMeBefore();
|
||||
row["dont_root_me_before"] = mob->DontRootMeBefore();
|
||||
row["dont_snare_me_before"] = mob->DontSnareMeBefore();
|
||||
row["drakkin_details"] = mob->GetDrakkinDetails();
|
||||
row["drakkin_heritage"] = mob->GetDrakkinHeritage();
|
||||
row["drakkin_tattoo"] = mob->GetDrakkinTattoo();
|
||||
row["emote_id"] = mob->GetEmoteID();
|
||||
row["equipment_light_type"] = mob->GetEquipmentLightType();
|
||||
row["eye_color1"] = mob->GetEyeColor1();
|
||||
row["eye_color2"] = mob->GetEyeColor2();
|
||||
row["fear_speed"] = mob->GetFearSpeed();
|
||||
row["flurry_chance"] = mob->GetFlurryChance();
|
||||
row["follow_can_run"] = mob->GetFollowCanRun();
|
||||
row["follow_distance"] = mob->GetFollowDistance();
|
||||
row["follow_id"] = mob->GetFollowID();
|
||||
row["gender"] = mob->GetGender();
|
||||
row["hair_color"] = mob->GetHairColor();
|
||||
row["hair_style"] = mob->GetHairStyle();
|
||||
row["has_active_song"] = mob->HasActiveSong();
|
||||
row["has_assist_aggro"] = mob->HasAssistAggro();
|
||||
row["has_died"] = mob->HasDied();
|
||||
row["has_disc_buff"] = mob->HasDiscBuff();
|
||||
row["has_endur_upkeep"] = mob->HasEndurUpkeep();
|
||||
row["has_free_aura_slots"] = mob->HasFreeAuraSlots();
|
||||
row["has_free_trap_slots"] = mob->HasFreeTrapSlots();
|
||||
row["has_mgb"] = mob->HasMGB();
|
||||
row["has_numhits"] = mob->HasNumhits();
|
||||
row["has_pet"] = mob->HasPet();
|
||||
row["has_pet_affinity"] = mob->HasPetAffinity();
|
||||
row["has_primary_aggro"] = mob->HasPrimaryAggro();
|
||||
row["has_project_illusion"] = mob->HasProjectIllusion();
|
||||
row["has_projectile_attack"] = mob->HasProjectileAttack();
|
||||
row["has_shield_equipped"] = mob->HasShieldEquipped();
|
||||
row["has_special_abilities"] = mob->HasSpecialAbilities();
|
||||
row["has_tar_reflection"] = mob->HasTargetReflection();
|
||||
row["has_temp_pets_active"] = mob->HasTempPetsActive();
|
||||
row["has_two_hand_blunt_equipped"] = mob->HasTwoHandBluntEquipped();
|
||||
row["has_two_hander_equipped"] = mob->HasTwoHanderEquipped();
|
||||
row["hate_summon"] = mob->HateSummon();
|
||||
row["helm_texture"] = mob->GetHelmTexture();
|
||||
row["hp"] = mob->GetHP();
|
||||
row["improved_taunt"] = mob->ImprovedTaunt();
|
||||
row["innate_light_type"] = mob->GetInnateLightType();
|
||||
row["is_ai_controlled"] = mob->IsAIControlled();
|
||||
row["is_amnesiad"] = mob->IsAmnesiad();
|
||||
row["is_animation"] = mob->IsAnimation();
|
||||
row["is_blind"] = mob->IsBlind();
|
||||
row["is_casting"] = mob->IsCasting();
|
||||
row["is_charmed"] = mob->IsCharmed();
|
||||
row["is_destructible_object"] = mob->IsDestructibleObject();
|
||||
row["is_engaged"] = mob->IsEngaged();
|
||||
row["is_enraged"] = mob->IsEnraged();
|
||||
row["is_familiar"] = mob->IsFamiliar();
|
||||
row["is_feared"] = mob->IsFeared();
|
||||
row["is_findable"] = mob->IsFindable();
|
||||
row["is_focused"] = mob->IsFocused();
|
||||
row["is_g_held"] = mob->IsGHeld();
|
||||
row["is_grouped"] = mob->IsGrouped();
|
||||
row["is_held"] = mob->IsHeld();
|
||||
row["is_looting"] = mob->IsLooting();
|
||||
row["is_melee_disabled"] = mob->IsMeleeDisabled();
|
||||
row["is_mezzed"] = mob->IsMezzed();
|
||||
row["is_moved"] = mob->IsMoved();
|
||||
row["is_moving"] = mob->IsMoving();
|
||||
row["is_no_cast"] = mob->IsNoCast();
|
||||
row["is_off_hand_atk"] = mob->IsOffHandAtk();
|
||||
row["is_pet_owner_client"] = mob->IsPetOwnerClient();
|
||||
row["is_pet_regroup"] = mob->IsPetRegroup();
|
||||
row["is_pet_stop"] = mob->IsPetStop();
|
||||
row["is_pseudo_rooted"] = mob->IsPseudoRooted();
|
||||
row["is_raid_grouped"] = mob->IsRaidGrouped();
|
||||
row["is_rare_spawn"] = mob->IsRareSpawn();
|
||||
row["is_roamer"] = mob->IsRoamer();
|
||||
row["is_rooted"] = mob->IsRooted();
|
||||
row["is_running"] = mob->IsRunning();
|
||||
row["is_silenced"] = mob->IsSilenced();
|
||||
row["is_stunned"] = mob->IsStunned();
|
||||
row["is_tar_lock_pet"] = mob->IsTargetLockPet();
|
||||
row["is_tarable"] = mob->IsTargetable();
|
||||
row["is_tared"] = mob->IsTargeted();
|
||||
row["is_temp_pet"] = mob->IsTempPet();
|
||||
row["is_trackable"] = mob->IsTrackable();
|
||||
row["item_hp_bonuses"] = mob->GetItemHPBonuses();
|
||||
row["last_name"] = mob->GetLastName();
|
||||
row["level"] = mob->GetLevel();
|
||||
row["luclin_face"] = mob->GetLuclinFace();
|
||||
row["mana"] = mob->GetMana();
|
||||
row["mana_percent"] = mob->GetManaPercent();
|
||||
row["mana_ratio"] = mob->GetManaRatio();
|
||||
row["max_hp"] = mob->GetMaxHP();
|
||||
row["max_mana"] = mob->GetMaxMana();
|
||||
row["melee_mitigation"] = mob->GetMeleeMitigation();
|
||||
row["mitigation_ac"] = mob->GetMitigationAC();
|
||||
row["movespeed"] = mob->GetMovespeed();
|
||||
row["name"] = mob->GetName();
|
||||
row["next_hp_event"] = mob->GetNextHPEvent();
|
||||
row["next_inc_hp_event"] = mob->GetNextIncHPEvent();
|
||||
row["npc_assist_cap"] = mob->NPCAssistCap();
|
||||
row["npc_type_id"] = mob->GetNPCTypeID();
|
||||
row["orig_level"] = mob->GetOrigLevel();
|
||||
row["orig_name"] = mob->GetOrigName();
|
||||
row["owner_id"] = mob->GetOwnerID();
|
||||
row["pet_id"] = mob->GetPetID();
|
||||
row["pet_power"] = mob->GetPetPower();
|
||||
row["pet_tar_lock_id"] = mob->GetPetTargetLockID();
|
||||
row["qglobal"] = mob->GetQglobal();
|
||||
row["race"] = mob->GetRace();
|
||||
row["run_anim_speed"] = mob->GetRunAnimSpeed();
|
||||
row["sanctuary"] = mob->Sanctuary();
|
||||
row["see_hide"] = mob->SeeHide();
|
||||
row["see_improved_hide"] = mob->SeeImprovedHide();
|
||||
row["see_invisible"] = mob->SeeInvisible();
|
||||
row["see_invisible_undead"] = mob->SeeInvisibleUndead();
|
||||
row["size"] = mob->GetSize();
|
||||
row["slow_mitigation"] = mob->GetSlowMitigation();
|
||||
row["snared_amount"] = mob->GetSnaredAmount();
|
||||
row["spawned"] = mob->Spawned();
|
||||
row["spell_hp_bonuses"] = mob->GetSpellHPBonuses();
|
||||
row["spell_light_type"] = mob->GetSpellLightType();
|
||||
row["spell_power_distance_mod"] = mob->GetSpellPowerDistanceMod();
|
||||
row["spell_x"] = mob->GetSpellX();
|
||||
row["spell_y"] = mob->GetSpellY();
|
||||
row["spell_z"] = mob->GetSpellZ();
|
||||
row["tar_ring_x"] = mob->GetTargetRingX();
|
||||
row["tar_ring_y"] = mob->GetTargetRingY();
|
||||
row["tar_ring_z"] = mob->GetTargetRingZ();
|
||||
row["temp_pet_count"] = mob->GetTempPetCount();
|
||||
row["texture"] = mob->GetTexture();
|
||||
row["trap_slots"] = mob->GetTrapSlots();
|
||||
row["try_death_save"] = mob->TryDeathSave();
|
||||
row["try_divine_save"] = mob->TryDivineSave();
|
||||
row["try_spell_on_death"] = mob->TrySpellOnDeath();
|
||||
row["update_active_light"] = mob->UpdateActiveLight();
|
||||
row["wander_type"] = mob->GetWanderType();
|
||||
|
||||
response.append(row);
|
||||
}
|
||||
|
||||
+43
-29
@@ -592,7 +592,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit)
|
||||
}
|
||||
|
||||
// Try Shield Block OR TwoHandBluntBlockCheck
|
||||
if (HasShieldEquiped() && (aabonuses.ShieldBlock || spellbonuses.ShieldBlock || itembonuses.ShieldBlock) && (InFront || bBlockFromRear)) {
|
||||
if (HasShieldEquipped() && (aabonuses.ShieldBlock || spellbonuses.ShieldBlock || itembonuses.ShieldBlock) && (InFront || bBlockFromRear)) {
|
||||
int chance = aabonuses.ShieldBlock + spellbonuses.ShieldBlock + itembonuses.ShieldBlock;
|
||||
if (counter_block || counter_all) {
|
||||
float counter = (counter_block + counter_all) / 100.0f;
|
||||
@@ -604,7 +604,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit)
|
||||
}
|
||||
}
|
||||
|
||||
if (HasTwoHandBluntEquiped() && (aabonuses.TwoHandBluntBlock || spellbonuses.TwoHandBluntBlock || itembonuses.TwoHandBluntBlock) && (InFront || bBlockFromRear)) {
|
||||
if (HasTwoHandBluntEquipped() && (aabonuses.TwoHandBluntBlock || spellbonuses.TwoHandBluntBlock || itembonuses.TwoHandBluntBlock) && (InFront || bBlockFromRear)) {
|
||||
int chance = aabonuses.TwoHandBluntBlock + itembonuses.TwoHandBluntBlock + spellbonuses.TwoHandBluntBlock;
|
||||
if (counter_block || counter_all) {
|
||||
float counter = (counter_block + counter_all) / 100.0f;
|
||||
@@ -874,7 +874,7 @@ int Mob::ACSum(bool skip_caps)
|
||||
int ac = 0; // this should be base AC whenever shrouds come around
|
||||
ac += itembonuses.AC; // items + food + tribute
|
||||
int shield_ac = 0;
|
||||
if (HasShieldEquiped() && IsOfClientBot()) {
|
||||
if (HasShieldEquipped() && IsOfClientBot()) {
|
||||
auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary);
|
||||
if (inst) {
|
||||
if (inst->GetItemRecommendedLevel(true) <= GetLevel()) {
|
||||
@@ -1555,7 +1555,7 @@ bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary)
|
||||
my_hit.base_damage = DoDamageCaps(my_hit.base_damage);
|
||||
auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod;
|
||||
if (shield_inc > 0 && HasShieldEquiped() && Hand == EQ::invslot::slotPrimary) {
|
||||
if (shield_inc > 0 && HasShieldEquipped() && Hand == EQ::invslot::slotPrimary) {
|
||||
my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100;
|
||||
hate = hate * (100 + shield_inc) / 100;
|
||||
}
|
||||
@@ -2505,8 +2505,10 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
bool ownerInGroup = false;
|
||||
if ((give_exp->HasGroup() && give_exp->GetGroup()->IsGroupMember(give_exp->GetUltimateOwner()))
|
||||
|| (give_exp->IsPet() && (give_exp->GetOwner()->IsClient()
|
||||
|| (give_exp->GetOwner()->HasGroup() && give_exp->GetOwner()->GetGroup()->IsGroupMember(give_exp->GetOwner()->GetUltimateOwner())))))
|
||||
|| (give_exp->GetOwner()->HasGroup() && give_exp->GetOwner()->GetGroup()->IsGroupMember(give_exp->GetOwner()->GetUltimateOwner()))))
|
||||
) {
|
||||
ownerInGroup = true;
|
||||
}
|
||||
|
||||
give_exp = give_exp->GetUltimateOwner();
|
||||
|
||||
@@ -2518,20 +2520,23 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
if (give_exp && give_exp->IsTempPet() && give_exp->IsPetOwnerClient()) {
|
||||
if (give_exp->IsNPC() && give_exp->CastToNPC()->GetSwarmOwner()) {
|
||||
Mob* temp_owner = entity_list.GetMobID(give_exp->CastToNPC()->GetSwarmOwner());
|
||||
if (temp_owner)
|
||||
if (temp_owner) {
|
||||
give_exp = temp_owner;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int PlayerCount = 0; // QueryServ Player Counting
|
||||
|
||||
Client *give_exp_client = nullptr;
|
||||
if (give_exp && give_exp->IsClient())
|
||||
if (give_exp && give_exp->IsClient()) {
|
||||
give_exp_client = give_exp->CastToClient();
|
||||
}
|
||||
|
||||
//do faction hits even if we are a merchant, so long as a player killed us
|
||||
if (!IsCharmed() && give_exp_client && !RuleB(NPC, EnableMeritBasedFaction))
|
||||
if (!IsCharmed() && give_exp_client && !RuleB(NPC, EnableMeritBasedFaction)) {
|
||||
hate_list.DoFactionHits(GetNPCFactionID(), GetPrimaryFaction(), GetFactionAmount());
|
||||
}
|
||||
|
||||
bool IsLdonTreasure = (GetClass() == LDON_TREASURE);
|
||||
|
||||
@@ -2559,17 +2564,22 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
}
|
||||
|
||||
/* Send the EVENT_KILLED_MERIT event for all raid members */
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (kr->members[i].member != nullptr && kr->members[i].member->IsClient()) { // If Group Member is Client
|
||||
Client *c = kr->members[i].member;
|
||||
for (const auto& m : kr->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) { // If Group Member is Client
|
||||
Client *c = m.member;
|
||||
|
||||
c->RecordKilledNPCEvent(this);
|
||||
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_KILLED_MERIT)) {
|
||||
parse->EventNPC(EVENT_KILLED_MERIT, this, c, "killed", 0);
|
||||
}
|
||||
|
||||
if (RuleB(NPC, EnableMeritBasedFaction))
|
||||
if (RuleB(NPC, EnableMeritBasedFaction)) {
|
||||
c->SetFactionLevel(c->CharacterID(), GetNPCFactionID(), c->GetBaseClass(), c->GetBaseRace(), c->GetDeity());
|
||||
}
|
||||
|
||||
PlayerCount++;
|
||||
}
|
||||
@@ -2586,9 +2596,13 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
QS->s1.NPCID = GetNPCTypeID();
|
||||
QS->s1.ZoneID = GetZoneID();
|
||||
QS->s1.Type = 2; // Raid Fight
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if (kr->members[i].member != nullptr && kr->members[i].member->IsClient()) { // If Group Member is Client
|
||||
Client *c = kr->members[i].member;
|
||||
for (const auto& m : kr->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) { // If Group Member is Client
|
||||
Client *c = m.member;
|
||||
QS->Chars[PlayerCount].char_id = c->CharacterID();
|
||||
PlayerCount++;
|
||||
}
|
||||
@@ -2742,34 +2756,34 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
Raid* r = entity_list.GetRaidByClient(killer->CastToClient());
|
||||
if (r) {
|
||||
int i = 0;
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++) {
|
||||
for (const auto& m : r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (r->GetLootType()) {
|
||||
case 0:
|
||||
case 1:
|
||||
if (r->members[x].member && r->members[x].is_raid_leader) {
|
||||
corpse->AllowPlayerLoot(r->members[x].member, i);
|
||||
if (m.member && m.is_raid_leader) {
|
||||
corpse->AllowPlayerLoot(m.member, i);
|
||||
i++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (r->members[x].member && r->members[x].is_raid_leader) {
|
||||
corpse->AllowPlayerLoot(r->members[x].member, i);
|
||||
i++;
|
||||
}
|
||||
else if (r->members[x].member && r->members[x].is_group_leader) {
|
||||
corpse->AllowPlayerLoot(r->members[x].member, i);
|
||||
if (m.member && (m.is_raid_leader || m.is_group_leader)) {
|
||||
corpse->AllowPlayerLoot(m.member, i);
|
||||
i++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (r->members[x].member && r->members[x].is_looter) {
|
||||
corpse->AllowPlayerLoot(r->members[x].member, i);
|
||||
if (m.member && m.is_looter) {
|
||||
corpse->AllowPlayerLoot(m.member, i);
|
||||
i++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (r->members[x].member) {
|
||||
corpse->AllowPlayerLoot(r->members[x].member, i);
|
||||
if (m.member) {
|
||||
corpse->AllowPlayerLoot(m.member, i);
|
||||
i++;
|
||||
}
|
||||
break;
|
||||
@@ -5981,7 +5995,7 @@ void Mob::DoShieldDamageOnShielder(Mob *shield_target, int64 hit_damage_done, EQ
|
||||
}
|
||||
|
||||
int mitigation = shielder->GetShielderMitigation(); //Default shielder mitigates 25 pct of damage taken, this can be increased up to max 50 by equipping a shield item
|
||||
if (shielder->IsClient() && shielder->HasShieldEquiped()) {
|
||||
if (shielder->IsClient() && shielder->HasShieldEquipped()) {
|
||||
EQ::ItemInstance* inst = shielder->CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary);
|
||||
if (inst) {
|
||||
const EQ::ItemData* shield = inst->GetItem();
|
||||
|
||||
+496
-406
File diff suppressed because it is too large
Load Diff
+13
-359
@@ -1112,7 +1112,7 @@ void Bot::GenerateAppearance() {
|
||||
|
||||
uint16 Bot::GetPrimarySkillValue() {
|
||||
EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
if (bool equiped = m_inv.GetItem(EQ::invslot::slotPrimary); !equiped) {
|
||||
if (bool equipped = m_inv.GetItem(EQ::invslot::slotPrimary); !equipped) {
|
||||
skill = EQ::skills::SkillHandtoHand;
|
||||
} else {
|
||||
uint8 type = m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->ItemType; //is this the best way to do this?
|
||||
@@ -3462,7 +3462,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
|
||||
if(item) {
|
||||
if(strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment.Primary.Material = Strings::ToInt(&item->IDFile[2]);
|
||||
ns->spawn.equipment.Primary.Material = Strings::ToUnsignedInt(&item->IDFile[2]);
|
||||
|
||||
|
||||
ns->spawn.equipment_tint.Primary.Color = GetEquipmentColor(EQ::textures::weaponPrimary);
|
||||
@@ -3475,7 +3475,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
|
||||
if(item) {
|
||||
if(strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment.Secondary.Material = Strings::ToInt(&item->IDFile[2]);
|
||||
ns->spawn.equipment.Secondary.Material = Strings::ToUnsignedInt(&item->IDFile[2]);
|
||||
|
||||
ns->spawn.equipment_tint.Secondary.Color = GetEquipmentColor(EQ::textures::weaponSecondary);
|
||||
}
|
||||
@@ -4870,7 +4870,7 @@ int Bot::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target)
|
||||
float skill_bonus = skill_level / 10.0f;
|
||||
float ac_bonus = 0.0f;
|
||||
const EQ::ItemInstance *inst = nullptr;
|
||||
if (HasShieldEquiped())
|
||||
if (HasShieldEquipped())
|
||||
inst = GetBotItem(EQ::invslot::slotSecondary);
|
||||
else if (HasTwoHanderEquipped())
|
||||
inst = GetBotItem(EQ::invslot::slotPrimary);
|
||||
@@ -7009,354 +7009,6 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) {
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::CalcItemBonuses(StatBonuses* newbon)
|
||||
{
|
||||
const EQ::ItemData* itemtmp = nullptr;
|
||||
|
||||
for (int i = EQ::invslot::BONUS_BEGIN; i <= EQ::invslot::BONUS_STAT_END; ++i) {
|
||||
const EQ::ItemInstance* item = GetBotItem(i);
|
||||
if (item) {
|
||||
AddItemBonuses(item, newbon);
|
||||
}
|
||||
}
|
||||
|
||||
// Caps
|
||||
if (newbon->HPRegen > CalcHPRegenCap())
|
||||
newbon->HPRegen = CalcHPRegenCap();
|
||||
|
||||
if (newbon->ManaRegen > CalcManaRegenCap())
|
||||
newbon->ManaRegen = CalcManaRegenCap();
|
||||
|
||||
if (newbon->EnduranceRegen > CalcEnduranceRegenCap())
|
||||
newbon->EnduranceRegen = CalcEnduranceRegenCap();
|
||||
}
|
||||
|
||||
void Bot::AddItemBonuses(const EQ::ItemInstance *inst, StatBonuses* newbon, bool isAug, bool isTribute, int rec_override) {
|
||||
if (!inst || !inst->IsClassCommon())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (inst->GetAugmentType()==0 && isAug)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const EQ::ItemData *item = inst->GetItem();
|
||||
|
||||
if (!isTribute && !inst->IsEquipable(GetBaseRace(),GetClass()))
|
||||
{
|
||||
if (item->ItemType != EQ::item::ItemTypeFood && item->ItemType != EQ::item::ItemTypeDrink)
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetLevel() < inst->GetItemRequiredLevel(true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto rec_level = isAug ? rec_override : inst->GetItemRecommendedLevel(true);
|
||||
if (GetLevel() >= rec_level)
|
||||
{
|
||||
newbon->AC += item->AC;
|
||||
newbon->HP += item->HP;
|
||||
newbon->Mana += item->Mana;
|
||||
newbon->Endurance += item->Endur;
|
||||
newbon->ATK += item->Attack;
|
||||
newbon->STR += (item->AStr + item->HeroicStr);
|
||||
newbon->STA += (item->ASta + item->HeroicSta);
|
||||
newbon->DEX += (item->ADex + item->HeroicDex);
|
||||
newbon->AGI += (item->AAgi + item->HeroicAgi);
|
||||
newbon->INT += (item->AInt + item->HeroicInt);
|
||||
newbon->WIS += (item->AWis + item->HeroicWis);
|
||||
newbon->CHA += (item->ACha + item->HeroicCha);
|
||||
|
||||
newbon->MR += (item->MR + item->HeroicMR);
|
||||
newbon->FR += (item->FR + item->HeroicFR);
|
||||
newbon->CR += (item->CR + item->HeroicCR);
|
||||
newbon->PR += (item->PR + item->HeroicPR);
|
||||
newbon->DR += (item->DR + item->HeroicDR);
|
||||
newbon->Corrup += (item->SVCorruption + item->HeroicSVCorrup);
|
||||
|
||||
newbon->STRCapMod += item->HeroicStr;
|
||||
newbon->STACapMod += item->HeroicSta;
|
||||
newbon->DEXCapMod += item->HeroicDex;
|
||||
newbon->AGICapMod += item->HeroicAgi;
|
||||
newbon->INTCapMod += item->HeroicInt;
|
||||
newbon->WISCapMod += item->HeroicWis;
|
||||
newbon->CHACapMod += item->HeroicCha;
|
||||
newbon->MRCapMod += item->HeroicMR;
|
||||
newbon->CRCapMod += item->HeroicFR;
|
||||
newbon->FRCapMod += item->HeroicCR;
|
||||
newbon->PRCapMod += item->HeroicPR;
|
||||
newbon->DRCapMod += item->HeroicDR;
|
||||
newbon->CorrupCapMod += item->HeroicSVCorrup;
|
||||
|
||||
newbon->HeroicSTR += item->HeroicStr;
|
||||
newbon->HeroicSTA += item->HeroicSta;
|
||||
newbon->HeroicDEX += item->HeroicDex;
|
||||
newbon->HeroicAGI += item->HeroicAgi;
|
||||
newbon->HeroicINT += item->HeroicInt;
|
||||
newbon->HeroicWIS += item->HeroicWis;
|
||||
newbon->HeroicCHA += item->HeroicCha;
|
||||
newbon->HeroicMR += item->HeroicMR;
|
||||
newbon->HeroicFR += item->HeroicFR;
|
||||
newbon->HeroicCR += item->HeroicCR;
|
||||
newbon->HeroicPR += item->HeroicPR;
|
||||
newbon->HeroicDR += item->HeroicDR;
|
||||
newbon->HeroicCorrup += item->HeroicSVCorrup;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int lvl = GetLevel();
|
||||
|
||||
newbon->AC += CalcRecommendedLevelBonus( lvl, rec_level, item->AC );
|
||||
newbon->HP += CalcRecommendedLevelBonus( lvl, rec_level, item->HP );
|
||||
newbon->Mana += CalcRecommendedLevelBonus( lvl, rec_level, item->Mana );
|
||||
newbon->Endurance += CalcRecommendedLevelBonus( lvl, rec_level, item->Endur );
|
||||
newbon->ATK += CalcRecommendedLevelBonus( lvl, rec_level, item->Attack );
|
||||
newbon->STR += CalcRecommendedLevelBonus( lvl, rec_level, (item->AStr + item->HeroicStr) );
|
||||
newbon->STA += CalcRecommendedLevelBonus( lvl, rec_level, (item->ASta + item->HeroicSta) );
|
||||
newbon->DEX += CalcRecommendedLevelBonus( lvl, rec_level, (item->ADex + item->HeroicDex) );
|
||||
newbon->AGI += CalcRecommendedLevelBonus( lvl, rec_level, (item->AAgi + item->HeroicAgi) );
|
||||
newbon->INT += CalcRecommendedLevelBonus( lvl, rec_level, (item->AInt + item->HeroicInt) );
|
||||
newbon->WIS += CalcRecommendedLevelBonus( lvl, rec_level, (item->AWis + item->HeroicWis) );
|
||||
newbon->CHA += CalcRecommendedLevelBonus( lvl, rec_level, (item->ACha + item->HeroicCha) );
|
||||
|
||||
newbon->MR += CalcRecommendedLevelBonus( lvl, rec_level, (item->MR + item->HeroicMR) );
|
||||
newbon->FR += CalcRecommendedLevelBonus( lvl, rec_level, (item->FR + item->HeroicFR) );
|
||||
newbon->CR += CalcRecommendedLevelBonus( lvl, rec_level, (item->CR + item->HeroicCR) );
|
||||
newbon->PR += CalcRecommendedLevelBonus( lvl, rec_level, (item->PR + item->HeroicPR) );
|
||||
newbon->DR += CalcRecommendedLevelBonus( lvl, rec_level, (item->DR + item->HeroicDR) );
|
||||
newbon->Corrup += CalcRecommendedLevelBonus( lvl, rec_level, (item->SVCorruption + item->HeroicSVCorrup) );
|
||||
|
||||
newbon->STRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicStr );
|
||||
newbon->STACapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicSta );
|
||||
newbon->DEXCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicDex );
|
||||
newbon->AGICapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicAgi );
|
||||
newbon->INTCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicInt );
|
||||
newbon->WISCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicWis );
|
||||
newbon->CHACapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicCha );
|
||||
newbon->MRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicMR );
|
||||
newbon->CRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicFR );
|
||||
newbon->FRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicCR );
|
||||
newbon->PRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicPR );
|
||||
newbon->DRCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicDR );
|
||||
newbon->CorrupCapMod += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicSVCorrup );
|
||||
|
||||
newbon->HeroicSTR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicStr );
|
||||
newbon->HeroicSTA += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicSta );
|
||||
newbon->HeroicDEX += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicDex );
|
||||
newbon->HeroicAGI += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicAgi );
|
||||
newbon->HeroicINT += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicInt );
|
||||
newbon->HeroicWIS += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicWis );
|
||||
newbon->HeroicCHA += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicCha );
|
||||
newbon->HeroicMR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicMR );
|
||||
newbon->HeroicFR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicFR );
|
||||
newbon->HeroicCR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicCR );
|
||||
newbon->HeroicPR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicPR );
|
||||
newbon->HeroicDR += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicDR );
|
||||
newbon->HeroicCorrup += CalcRecommendedLevelBonus( lvl, rec_level, item->HeroicSVCorrup );
|
||||
}
|
||||
|
||||
//FatherNitwit: New style haste, shields, and regens
|
||||
if (newbon->haste < (int32)item->Haste) {
|
||||
newbon->haste = item->Haste;
|
||||
}
|
||||
if (item->Regen > 0)
|
||||
newbon->HPRegen += item->Regen;
|
||||
|
||||
if (item->ManaRegen > 0)
|
||||
newbon->ManaRegen += item->ManaRegen;
|
||||
|
||||
if (item->EnduranceRegen > 0)
|
||||
newbon->EnduranceRegen += item->EnduranceRegen;
|
||||
|
||||
if (item->DamageShield > 0) {
|
||||
if ((newbon->DamageShield + item->DamageShield) > RuleI(Character, ItemDamageShieldCap))
|
||||
newbon->DamageShield = RuleI(Character, ItemDamageShieldCap);
|
||||
else
|
||||
newbon->DamageShield += item->DamageShield;
|
||||
}
|
||||
if (item->SpellShield > 0) {
|
||||
if ((newbon->SpellShield + item->SpellShield) > RuleI(Character, ItemSpellShieldingCap))
|
||||
newbon->SpellShield = RuleI(Character, ItemSpellShieldingCap);
|
||||
else
|
||||
newbon->SpellShield += item->SpellShield;
|
||||
}
|
||||
if (item->Shielding > 0) {
|
||||
if ((newbon->MeleeMitigation + item->Shielding) > RuleI(Character, ItemShieldingCap))
|
||||
newbon->MeleeMitigation = RuleI(Character, ItemShieldingCap);
|
||||
else
|
||||
newbon->MeleeMitigation += item->Shielding;
|
||||
}
|
||||
if (item->StunResist > 0) {
|
||||
if ((newbon->StunResist + item->StunResist) > RuleI(Character, ItemStunResistCap))
|
||||
newbon->StunResist = RuleI(Character, ItemStunResistCap);
|
||||
else
|
||||
newbon->StunResist += item->StunResist;
|
||||
}
|
||||
if (item->StrikeThrough > 0) {
|
||||
if ((newbon->StrikeThrough + item->StrikeThrough) > RuleI(Character, ItemStrikethroughCap))
|
||||
newbon->StrikeThrough = RuleI(Character, ItemStrikethroughCap);
|
||||
else
|
||||
newbon->StrikeThrough += item->StrikeThrough;
|
||||
}
|
||||
if (item->Avoidance > 0) {
|
||||
if ((newbon->AvoidMeleeChance + item->Avoidance) > RuleI(Character, ItemAvoidanceCap))
|
||||
newbon->AvoidMeleeChance = RuleI(Character, ItemAvoidanceCap);
|
||||
else
|
||||
newbon->AvoidMeleeChance += item->Avoidance;
|
||||
}
|
||||
if (item->Accuracy > 0) {
|
||||
if ((newbon->HitChance + item->Accuracy) > RuleI(Character, ItemAccuracyCap))
|
||||
newbon->HitChance = RuleI(Character, ItemAccuracyCap);
|
||||
else
|
||||
newbon->HitChance += item->Accuracy;
|
||||
}
|
||||
if (item->CombatEffects > 0) {
|
||||
if ((newbon->ProcChance + item->CombatEffects) > RuleI(Character, ItemCombatEffectsCap))
|
||||
newbon->ProcChance = RuleI(Character, ItemCombatEffectsCap);
|
||||
else
|
||||
newbon->ProcChance += item->CombatEffects;
|
||||
}
|
||||
if (item->DotShielding > 0) {
|
||||
if ((newbon->DoTShielding + item->DotShielding) > RuleI(Character, ItemDoTShieldingCap))
|
||||
newbon->DoTShielding = RuleI(Character, ItemDoTShieldingCap);
|
||||
else
|
||||
newbon->DoTShielding += item->DotShielding;
|
||||
}
|
||||
|
||||
if (item->HealAmt > 0) {
|
||||
if ((newbon->HealAmt + item->HealAmt) > RuleI(Character, ItemHealAmtCap))
|
||||
newbon->HealAmt = RuleI(Character, ItemHealAmtCap);
|
||||
else
|
||||
newbon->HealAmt += item->HealAmt;
|
||||
}
|
||||
if (item->SpellDmg > 0) {
|
||||
if ((newbon->SpellDmg + item->SpellDmg) > RuleI(Character, ItemSpellDmgCap))
|
||||
newbon->SpellDmg = RuleI(Character, ItemSpellDmgCap);
|
||||
else
|
||||
newbon->SpellDmg += item->SpellDmg;
|
||||
}
|
||||
if (item->Clairvoyance > 0) {
|
||||
if ((newbon->Clairvoyance + item->Clairvoyance) > RuleI(Character, ItemClairvoyanceCap))
|
||||
newbon->Clairvoyance = RuleI(Character, ItemClairvoyanceCap);
|
||||
else
|
||||
newbon->Clairvoyance += item->Clairvoyance;
|
||||
}
|
||||
|
||||
if (item->DSMitigation > 0) {
|
||||
if ((newbon->DSMitigation + item->DSMitigation) > RuleI(Character, ItemDSMitigationCap))
|
||||
newbon->DSMitigation = RuleI(Character, ItemDSMitigationCap);
|
||||
else
|
||||
newbon->DSMitigation += item->DSMitigation;
|
||||
}
|
||||
if (item->Worn.Effect > 0 && item->Worn.Type == EQ::item::ItemEffectWorn) {// latent effects
|
||||
ApplySpellsBonuses(item->Worn.Effect, item->Worn.Level, newbon, 0, item->Worn.Type);
|
||||
}
|
||||
|
||||
if (item->Focus.Effect>0 && (item->Focus.Type == EQ::item::ItemEffectFocus)) { // focus effects
|
||||
ApplySpellsBonuses(item->Focus.Effect, item->Focus.Level, newbon, 0);
|
||||
}
|
||||
|
||||
switch(item->BardType)
|
||||
{
|
||||
case EQ::item::ItemTypeAllInstrumentTypes: // (e.g. Singing Short Sword)
|
||||
{
|
||||
if (item->BardValue > newbon->singingMod)
|
||||
newbon->singingMod = item->BardValue;
|
||||
if (item->BardValue > newbon->brassMod)
|
||||
newbon->brassMod = item->BardValue;
|
||||
if (item->BardValue > newbon->stringedMod)
|
||||
newbon->stringedMod = item->BardValue;
|
||||
if (item->BardValue > newbon->percussionMod)
|
||||
newbon->percussionMod = item->BardValue;
|
||||
if (item->BardValue > newbon->windMod)
|
||||
newbon->windMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case EQ::item::ItemTypeSinging:
|
||||
{
|
||||
if (item->BardValue > newbon->singingMod)
|
||||
newbon->singingMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case EQ::item::ItemTypeWindInstrument:
|
||||
{
|
||||
if (item->BardValue > newbon->windMod)
|
||||
newbon->windMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case EQ::item::ItemTypeStringedInstrument:
|
||||
{
|
||||
if (item->BardValue > newbon->stringedMod)
|
||||
newbon->stringedMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case EQ::item::ItemTypeBrassInstrument:
|
||||
{
|
||||
if (item->BardValue > newbon->brassMod)
|
||||
newbon->brassMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case EQ::item::ItemTypePercussionInstrument:
|
||||
{
|
||||
if (item->BardValue > newbon->percussionMod)
|
||||
newbon->percussionMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (item->SkillModValue != 0 && item->SkillModType <= EQ::skills::HIGHEST_SKILL) {
|
||||
if ((item->SkillModValue > 0 && newbon->skillmod[item->SkillModType] < item->SkillModValue) ||
|
||||
(item->SkillModValue < 0 && newbon->skillmod[item->SkillModType] > item->SkillModValue))
|
||||
{
|
||||
newbon->skillmod[item->SkillModType] = item->SkillModValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (item->ExtraDmgAmt != 0 && item->ExtraDmgSkill <= EQ::skills::HIGHEST_SKILL) {
|
||||
if (
|
||||
RuleI(Character, ItemExtraDmgCap) >= 0 &&
|
||||
(newbon->SkillDamageAmount[item->ExtraDmgSkill] + item->ExtraDmgAmt) > RuleI(Character, ItemExtraDmgCap)
|
||||
) {
|
||||
newbon->SkillDamageAmount[item->ExtraDmgSkill] = RuleI(Character, ItemExtraDmgCap);
|
||||
} else {
|
||||
newbon->SkillDamageAmount[item->ExtraDmgSkill] += item->ExtraDmgAmt;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAug)
|
||||
{
|
||||
for (int i = EQ::invaug::SOCKET_BEGIN; i <= EQ::invaug::SOCKET_END; i++)
|
||||
AddItemBonuses(inst->GetAugment(i),newbon,true, false, rec_level);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int Bot::CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat)
|
||||
{
|
||||
if ( (reclevel > 0) && (level < reclevel) )
|
||||
{
|
||||
int32 statmod = (level * 10000 / reclevel) * basestat;
|
||||
|
||||
if ( statmod < 0 )
|
||||
{
|
||||
statmod -= 5000;
|
||||
return (statmod/10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
statmod += 5000;
|
||||
return (statmod/10000);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This method is intended to call all necessary methods to do all bot stat calculations, including spell buffs, equipment, AA bonsues, etc.
|
||||
void Bot::CalcBotStats(bool showtext) {
|
||||
if (!GetBotOwner())
|
||||
@@ -9105,16 +8757,18 @@ std::vector<Mob*> Bot::GetApplySpellList(
|
||||
auto* r = GetRaid();
|
||||
auto group_id = r->GetGroup(GetCleanName());
|
||||
if (r && EQ::ValueWithin(group_id, 0, (MAX_RAID_GROUPS - 1))) {
|
||||
for (auto i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
auto* m = r->members[i].member;
|
||||
if (m && m->IsClient() && (!is_raid_group_only || r->GetGroup(m) == group_id)) {
|
||||
l.push_back(m);
|
||||
for (const auto& m : r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
if (m.member && m.member->IsClient() && (!is_raid_group_only || r->GetGroup(m.member) == group_id)) {
|
||||
l.push_back(m.member);
|
||||
|
||||
if (allow_pets && m->HasPet()) {
|
||||
l.push_back(m->GetPet());
|
||||
if (allow_pets && m.member->HasPet()) {
|
||||
l.push_back(m.member->GetPet());
|
||||
}
|
||||
|
||||
const auto& sbl = entity_list.GetBotListByCharacterID(m->CharacterID());
|
||||
const auto& sbl = entity_list.GetBotListByCharacterID(m.member->CharacterID());
|
||||
for (const auto& b : sbl) {
|
||||
l.push_back(b);
|
||||
}
|
||||
|
||||
+1
-3
@@ -184,9 +184,7 @@ public:
|
||||
void RogueAssassinate(Mob* other) override;
|
||||
void DoClassAttacks(Mob *target, bool IsRiposte=false);
|
||||
void CalcBonuses() override;
|
||||
void CalcItemBonuses(StatBonuses* newbon);
|
||||
void AddItemBonuses(const EQ::ItemInstance *inst, StatBonuses* newbon, bool isAug = false, bool isTribute = false, int rec_override = 0);
|
||||
int CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat);
|
||||
|
||||
void MakePet(uint16 spell_id, const char* pettype, const char *petname = nullptr) override;
|
||||
FACTION_VALUE GetReverseFactionCon(Mob* iOther) override;
|
||||
inline bool IsPet() override { return false; }
|
||||
|
||||
+53
-65
@@ -798,24 +798,21 @@ bool Client::SendAllPackets() {
|
||||
}
|
||||
|
||||
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CONN_STATUS required_state, eqFilterType filter) {
|
||||
if(filter!=FilterNone){
|
||||
//this is incomplete... no support for FilterShowGroupOnly or FilterShowSelfOnly
|
||||
if(GetFilter(filter) == FilterHide)
|
||||
return; //Client has this filter on, no need to send packet
|
||||
if (filter != FilterNone && GetFilter(filter) == FilterHide) {
|
||||
return;
|
||||
}
|
||||
if(client_state != CLIENT_CONNECTED && required_state == CLIENT_CONNECTED){
|
||||
|
||||
if (client_state != CLIENT_CONNECTED && required_state == CLIENT_CONNECTED) {
|
||||
AddPacket(app, ack_req);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// if the program doesnt care about the status or if the status isnt what we requested
|
||||
if (required_state != CLIENT_CONNECTINGALL && client_state != required_state)
|
||||
{
|
||||
if (required_state != CLIENT_CONNECTINGALL && client_state != required_state) {
|
||||
// todo: save packets for later use
|
||||
AddPacket(app, ack_req);
|
||||
}
|
||||
else if (eqs)
|
||||
{
|
||||
else if (eqs) {
|
||||
eqs->QueuePacket(app, ack_req);
|
||||
}
|
||||
}
|
||||
@@ -828,7 +825,7 @@ void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CON
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if(eqs)
|
||||
if(eqs)
|
||||
eqs->FastQueuePacket((EQApplicationPacket **)app, ack_req);
|
||||
else if (app && (*app))
|
||||
delete *app;
|
||||
@@ -1331,7 +1328,7 @@ void Client::ChannelMessageSend(const char* from, const char* to, uint8 chan_num
|
||||
|
||||
cm->chan_num = chan_num;
|
||||
strcpy(&cm->message[0], buffer);
|
||||
|
||||
|
||||
QueuePacket(&app);
|
||||
|
||||
bool senderCanTrainSelf = RuleB(Client, SelfLanguageLearning);
|
||||
@@ -4143,42 +4140,32 @@ void Client::UpdateLFP() {
|
||||
|
||||
bool Client::GroupFollow(Client* inviter) {
|
||||
|
||||
if (inviter)
|
||||
{
|
||||
if (inviter) {
|
||||
isgrouped = true;
|
||||
Raid* raid = entity_list.GetRaidByClient(inviter);
|
||||
Raid* iraid = entity_list.GetRaidByClient(this);
|
||||
|
||||
//inviter has a raid don't do group stuff instead do raid stuff!
|
||||
if (raid)
|
||||
{
|
||||
if (raid) {
|
||||
// Suspend the merc while in a raid (maybe a rule could be added for this)
|
||||
if (GetMerc())
|
||||
if (GetMerc()) {
|
||||
GetMerc()->Suspend();
|
||||
}
|
||||
|
||||
uint32 groupToUse = 0xFFFFFFFF;
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if (raid->members[x].member)
|
||||
{
|
||||
//this assumes the inviter is in the zone
|
||||
if (raid->members[x].member == inviter){
|
||||
groupToUse = raid->members[x].group_number;
|
||||
break;
|
||||
}
|
||||
for (const auto& m : raid->members) {
|
||||
if (m.member && m.member == inviter) {
|
||||
groupToUse = m.group_number;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (iraid == raid)
|
||||
{
|
||||
if (iraid == raid) {
|
||||
//both in same raid
|
||||
uint32 ngid = raid->GetGroup(inviter->GetName());
|
||||
if (raid->GroupCount(ngid) < 6)
|
||||
{
|
||||
if (raid->GroupCount(ngid) < 6) {
|
||||
raid->MoveMember(GetName(), ngid);
|
||||
raid->SendGroupDisband(this);
|
||||
//raid->SendRaidGroupAdd(GetName(), ngid);
|
||||
//raid->SendGroupUpdate(this);
|
||||
raid->GroupUpdate(ngid); //break
|
||||
raid->GroupUpdate(ngid);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -4336,9 +4323,9 @@ bool Client::GroupFollow(Client* inviter) {
|
||||
uint16 Client::GetPrimarySkillValue()
|
||||
{
|
||||
EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
|
||||
bool equiped = m_inv.GetItem(EQ::invslot::slotPrimary);
|
||||
bool equipped = m_inv.GetItem(EQ::invslot::slotPrimary);
|
||||
|
||||
if (!equiped)
|
||||
if (!equipped)
|
||||
skill = EQ::skills::SkillHandtoHand;
|
||||
|
||||
else {
|
||||
@@ -8866,16 +8853,15 @@ void Client::ProcessAggroMeter()
|
||||
if (m_aggrometer.set_pct(AggroMeter::AT_Secondary, has_aggro ? cur_tar->GetHateRatio(this, secondary) : secondary ? 100 : 0))
|
||||
add_entry(AggroMeter::AT_Secondary);
|
||||
|
||||
// fuuuuuuuuuuuuuuuuuuuuuuuucckkkkkkkkkkkkkkk raids
|
||||
if (IsRaidGrouped()) {
|
||||
auto raid = GetRaid();
|
||||
if (raid) {
|
||||
auto gid = raid->GetGroup(this);
|
||||
if (gid < 12) {
|
||||
if (gid < MAX_RAID_GROUPS) {
|
||||
int at_id = AggroMeter::AT_Group1;
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; ++i) {
|
||||
if (raid->members[i].member && raid->members[i].member != this && raid->members[i].group_number == gid) {
|
||||
if (m_aggrometer.set_pct(static_cast<AggroMeter::AggroTypes>(at_id), cur_tar->GetHateRatio(cur_tar->GetTarget(), raid->members[i].member)))
|
||||
for (const auto& m : raid->members) {
|
||||
if (m.member && m.member != this && m.group_number == gid) {
|
||||
if (m_aggrometer.set_pct(static_cast<AggroMeter::AggroTypes>(at_id), cur_tar->GetHateRatio(cur_tar->GetTarget(), m.member)))
|
||||
add_entry(static_cast<AggroMeter::AggroTypes>(at_id));
|
||||
at_id++;
|
||||
if (at_id > AggroMeter::AT_Group5)
|
||||
@@ -10724,11 +10710,11 @@ void Client::ApplyWeaponsStance()
|
||||
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) {
|
||||
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
|
||||
}
|
||||
else if (!HasShieldEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
else if (!HasShieldEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
|
||||
}
|
||||
else if (!HasDualWeaponsEquiped() &&
|
||||
else if (!HasDualWeaponsEquipped() &&
|
||||
IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
|
||||
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
|
||||
@@ -10740,14 +10726,14 @@ void Client::ApplyWeaponsStance()
|
||||
}
|
||||
weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
|
||||
}
|
||||
else if (HasShieldEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
else if (HasShieldEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
|
||||
if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
|
||||
}
|
||||
weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
|
||||
}
|
||||
else if (HasDualWeaponsEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
else if (HasDualWeaponsEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
|
||||
if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);
|
||||
@@ -10790,11 +10776,11 @@ void Client::ApplyWeaponsStance()
|
||||
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) {
|
||||
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
|
||||
}
|
||||
else if (!HasShieldEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
else if (!HasShieldEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
|
||||
}
|
||||
else if (!HasDualWeaponsEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
|
||||
else if (!HasDualWeaponsEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
|
||||
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
|
||||
}
|
||||
@@ -10807,14 +10793,14 @@ void Client::ApplyWeaponsStance()
|
||||
}
|
||||
weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
|
||||
}
|
||||
else if (HasShieldEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
else if (HasShieldEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
|
||||
if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
|
||||
}
|
||||
weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
|
||||
}
|
||||
else if (HasDualWeaponsEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
else if (HasDualWeaponsEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);
|
||||
}
|
||||
@@ -10847,12 +10833,12 @@ void Client::ApplyWeaponsStance()
|
||||
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
|
||||
}
|
||||
|
||||
else if (!HasShieldEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
else if (!HasShieldEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
|
||||
FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
|
||||
}
|
||||
|
||||
else if (!HasDualWeaponsEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
|
||||
else if (!HasDualWeaponsEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
|
||||
FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
|
||||
}
|
||||
@@ -10865,14 +10851,14 @@ void Client::ApplyWeaponsStance()
|
||||
weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
|
||||
}
|
||||
|
||||
else if (HasShieldEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
else if (HasShieldEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
|
||||
SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
|
||||
}
|
||||
weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
|
||||
}
|
||||
|
||||
else if (HasDualWeaponsEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
else if (HasDualWeaponsEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
|
||||
if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
|
||||
SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);
|
||||
@@ -10956,11 +10942,14 @@ std::vector<Client *> Client::GetPartyMembers()
|
||||
std::vector<Client *> clients_to_update = {};
|
||||
|
||||
// raid
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
for (auto &e : raid->members) {
|
||||
if (e.member && e.member->IsClient()) {
|
||||
clients_to_update.push_back(e.member->CastToClient());
|
||||
if (const auto raid = entity_list.GetRaidByClient(this)) {
|
||||
for (auto &m : raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
clients_to_update.push_back(m.member->CastToClient());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11747,17 +11736,16 @@ std::vector<Mob*> Client::GetApplySpellList(
|
||||
auto* r = GetRaid();
|
||||
auto group_id = r->GetGroup(this);
|
||||
if (r && EQ::ValueWithin(group_id, 0, (MAX_RAID_GROUPS - 1))) {
|
||||
for (auto i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
auto* m = r->members[i].member;
|
||||
if (m && m->IsClient() && (!is_raid_group_only || r->GetGroup(m) == group_id)) {
|
||||
l.push_back(m);
|
||||
for (const auto& m : r->members) {
|
||||
if (m.member && m.member->IsClient() && (!is_raid_group_only || r->GetGroup(m.member) == group_id)) {
|
||||
l.push_back(m.member);
|
||||
|
||||
if (allow_pets && m->HasPet()) {
|
||||
l.push_back(m->GetPet());
|
||||
if (allow_pets && m.member->HasPet()) {
|
||||
l.push_back(m.member->GetPet());
|
||||
}
|
||||
|
||||
if (allow_bots) {
|
||||
const auto& sbl = entity_list.GetBotListByCharacterID(m->CharacterID());
|
||||
const auto& sbl = entity_list.GetBotListByCharacterID(m.member->CharacterID());
|
||||
for (const auto& b : sbl) {
|
||||
l.push_back(b);
|
||||
}
|
||||
@@ -12186,4 +12174,4 @@ void Client::PlayerTradeEventLog(Trade *t, Trade *t2)
|
||||
|
||||
RecordPlayerEventLogWithClient(trader, PlayerEvent::TRADE, e);
|
||||
RecordPlayerEventLogWithClient(trader2, PlayerEvent::TRADE, e);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-4
@@ -588,7 +588,7 @@ public:
|
||||
//This calculates total Attack Rating to match very close to what the client should show
|
||||
uint32 GetTotalATK();
|
||||
uint32 GetATKRating();
|
||||
//This gets the skill value of the item type equiped in the Primary Slot
|
||||
//This gets the skill value of the item type equipped in the Primary Slot
|
||||
uint16 GetPrimarySkillValue();
|
||||
|
||||
bool Flurry();
|
||||
@@ -1645,9 +1645,6 @@ public:
|
||||
|
||||
protected:
|
||||
friend class Mob;
|
||||
void CalcItemBonuses(StatBonuses* newbon);
|
||||
void AddItemBonuses(const EQ::ItemInstance *inst, StatBonuses* newbon, bool isAug = false, bool isTribute = false, int rec_override = 0, bool ammo_slot_item = false);
|
||||
void AdditiveWornBonuses(const EQ::ItemInstance *inst, StatBonuses* newbon, bool isAug = false);
|
||||
void CalcEdibleBonuses(StatBonuses* newbon);
|
||||
void MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message = true);
|
||||
bool client_data_loaded;
|
||||
|
||||
@@ -12183,7 +12183,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
uint32 i = raid->GetPlayerIndex(raid_command_packet->leader_name);
|
||||
raid->SetNewRaidLeader(i);
|
||||
raid->HandleBotGroupDisband(c_to_disband->CharacterID());
|
||||
raid->HandleOfflineBots(c_to_disband->CharacterID());
|
||||
raid->HandleOfflineBots(c_to_disband->CharacterID());
|
||||
raid->RemoveMember(raid_command_packet->leader_name);
|
||||
raid->SendGroupDisband(c_to_disband);
|
||||
raid->GroupUpdate(group);
|
||||
|
||||
+8
-8
@@ -1964,10 +1964,10 @@ int Lua_Mob::GetFcDamageAmtIncoming(Lua_Mob caster, int32 spell_id)
|
||||
return self->GetFcDamageAmtIncoming(caster, spell_id);
|
||||
}
|
||||
|
||||
int Lua_Mob::GetSkillDmgAmt(uint16 skill)
|
||||
int Lua_Mob::GetSkillDmgAmt(int skill_id)
|
||||
{
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetSkillDmgAmt(skill);
|
||||
return self->GetSkillDmgAmt(skill_id);
|
||||
}
|
||||
|
||||
void Lua_Mob::SetAllowBeneficial(bool value) {
|
||||
@@ -2170,14 +2170,14 @@ bool Lua_Mob::IsTargetable() {
|
||||
return self->IsTargetable();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasShieldEquiped() {
|
||||
bool Lua_Mob::HasShieldEquipped() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasShieldEquiped();
|
||||
return self->HasShieldEquipped();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasTwoHandBluntEquiped() {
|
||||
bool Lua_Mob::HasTwoHandBluntEquipped() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasTwoHandBluntEquiped();
|
||||
return self->HasTwoHandBluntEquipped();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasTwoHanderEquipped() {
|
||||
@@ -3321,9 +3321,9 @@ luabind::scope lua_register_mob() {
|
||||
.def("HasOwner", (bool(Lua_Mob::*)(void))&Lua_Mob::HasOwner)
|
||||
.def("HasPet", (bool(Lua_Mob::*)(void))&Lua_Mob::HasPet)
|
||||
.def("HasProcs", &Lua_Mob::HasProcs)
|
||||
.def("HasShieldEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquiped)
|
||||
.def("HasShieldEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquipped)
|
||||
.def("HasTimer", &Lua_Mob::HasTimer)
|
||||
.def("HasTwoHandBluntEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquiped)
|
||||
.def("HasTwoHandBluntEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquipped)
|
||||
.def("HasTwoHanderEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHanderEquipped)
|
||||
.def("Heal", &Lua_Mob::Heal)
|
||||
.def("HealDamage", (void(Lua_Mob::*)(uint64))&Lua_Mob::HealDamage)
|
||||
|
||||
+3
-3
@@ -392,7 +392,7 @@ public:
|
||||
int GetModSkillDmgTaken(int skill);
|
||||
int GetSkillDmgTaken(int skill);
|
||||
int GetFcDamageAmtIncoming(Lua_Mob caster, int32 spell_id);
|
||||
int GetSkillDmgAmt(uint16 skill);
|
||||
int GetSkillDmgAmt(int skill_id);
|
||||
void SetAllowBeneficial(bool value);
|
||||
bool GetAllowBeneficial();
|
||||
bool IsBeneficialAllowed(Lua_Mob target);
|
||||
@@ -431,8 +431,8 @@ public:
|
||||
uint8 GetNimbusEffect2();
|
||||
uint8 GetNimbusEffect3();
|
||||
bool IsTargetable();
|
||||
bool HasShieldEquiped();
|
||||
bool HasTwoHandBluntEquiped();
|
||||
bool HasShieldEquipped();
|
||||
bool HasTwoHandBluntEquipped();
|
||||
bool HasTwoHanderEquipped();
|
||||
uint32 GetHerosForgeModel(uint8 material_slot);
|
||||
uint32 IsEliteMaterialItem(uint8 material_slot);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#ifdef LUA_EQEMU
|
||||
|
||||
#include "../common/data_verification.h"
|
||||
|
||||
#include "lua.hpp"
|
||||
#include <luabind/luabind.hpp>
|
||||
|
||||
@@ -1097,7 +1099,11 @@ int32 Lua_StatBonuses::GetSkillReuseTime(int idx) const {
|
||||
|
||||
int32 Lua_StatBonuses::GetSkillDamageAmount(int idx) const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->SkillDamageAmount[idx];
|
||||
if (!EQ::ValueWithin(idx, ALL_SKILLS, EQ::skills::HIGHEST_SKILL)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return idx == ALL_SKILLS ? self->SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1] : self->SkillDamageAmount[idx];
|
||||
}
|
||||
|
||||
int Lua_StatBonuses::GetHPPercCap(int idx) const {
|
||||
|
||||
@@ -85,7 +85,6 @@ volatile bool RunLoops = true;
|
||||
#endif
|
||||
|
||||
extern volatile bool is_zone_loaded;
|
||||
extern bool Critical = false;
|
||||
|
||||
#include "zone_event_scheduler.h"
|
||||
#include "../common/file.h"
|
||||
|
||||
-385
@@ -190,391 +190,6 @@ float Merc::GetDefaultSize() {
|
||||
return MercSize;
|
||||
}
|
||||
|
||||
int Merc::CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat)
|
||||
{
|
||||
if( (reclevel > 0) && (level < reclevel) )
|
||||
{
|
||||
int32 statmod = (level * 10000 / reclevel) * basestat;
|
||||
|
||||
if( statmod < 0 )
|
||||
{
|
||||
statmod -= 5000;
|
||||
return (statmod/10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
statmod += 5000;
|
||||
return (statmod/10000);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Merc::CalcItemBonuses(StatBonuses* newbon) {
|
||||
//memset assumed to be done by caller.
|
||||
|
||||
|
||||
unsigned int i;
|
||||
//should not include 21 (SLOT_AMMO)
|
||||
for (i = EQ::invslot::BONUS_BEGIN; i <= EQ::invslot::BONUS_STAT_END; i++) {
|
||||
if (i == EQ::invslot::slotAmmo)
|
||||
continue;
|
||||
if (equipment[i] == 0)
|
||||
continue;
|
||||
const EQ::ItemData * itm = database.GetItem(equipment[i]);
|
||||
if (itm)
|
||||
AddItemBonuses(itm, newbon);
|
||||
}
|
||||
|
||||
// Caps
|
||||
if(newbon->HPRegen > CalcHPRegenCap())
|
||||
newbon->HPRegen = CalcHPRegenCap();
|
||||
|
||||
if(newbon->ManaRegen > CalcManaRegenCap())
|
||||
newbon->ManaRegen = CalcManaRegenCap();
|
||||
|
||||
if(newbon->EnduranceRegen > CalcEnduranceRegenCap())
|
||||
newbon->EnduranceRegen = CalcEnduranceRegenCap();
|
||||
|
||||
SetAttackTimer();
|
||||
}
|
||||
|
||||
void Merc::AddItemBonuses(const EQ::ItemData *item, StatBonuses* newbon) {
|
||||
|
||||
if(GetLevel() < item->ReqLevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetLevel() >= item->RecLevel)
|
||||
{
|
||||
newbon->AC += item->AC;
|
||||
newbon->HP += item->HP;
|
||||
newbon->Mana += item->Mana;
|
||||
newbon->Endurance += item->Endur;
|
||||
newbon->STR += (item->AStr + item->HeroicStr);
|
||||
newbon->STA += (item->ASta + item->HeroicSta);
|
||||
newbon->DEX += (item->ADex + item->HeroicDex);
|
||||
newbon->AGI += (item->AAgi + item->HeroicAgi);
|
||||
newbon->INT += (item->AInt + item->HeroicInt);
|
||||
newbon->WIS += (item->AWis + item->HeroicWis);
|
||||
newbon->CHA += (item->ACha + item->HeroicCha);
|
||||
|
||||
newbon->MR += (item->MR + item->HeroicMR);
|
||||
newbon->FR += (item->FR + item->HeroicFR);
|
||||
newbon->CR += (item->CR + item->HeroicCR);
|
||||
newbon->PR += (item->PR + item->HeroicPR);
|
||||
newbon->DR += (item->DR + item->HeroicDR);
|
||||
newbon->Corrup += (item->SVCorruption + item->HeroicSVCorrup);
|
||||
|
||||
newbon->STRCapMod += item->HeroicStr;
|
||||
newbon->STACapMod += item->HeroicSta;
|
||||
newbon->DEXCapMod += item->HeroicDex;
|
||||
newbon->AGICapMod += item->HeroicAgi;
|
||||
newbon->INTCapMod += item->HeroicInt;
|
||||
newbon->WISCapMod += item->HeroicWis;
|
||||
newbon->CHACapMod += item->HeroicCha;
|
||||
newbon->MRCapMod += item->HeroicMR;
|
||||
newbon->CRCapMod += item->HeroicFR;
|
||||
newbon->FRCapMod += item->HeroicCR;
|
||||
newbon->PRCapMod += item->HeroicPR;
|
||||
newbon->DRCapMod += item->HeroicDR;
|
||||
newbon->CorrupCapMod += item->HeroicSVCorrup;
|
||||
|
||||
newbon->HeroicSTR += item->HeroicStr;
|
||||
newbon->HeroicSTA += item->HeroicSta;
|
||||
newbon->HeroicDEX += item->HeroicDex;
|
||||
newbon->HeroicAGI += item->HeroicAgi;
|
||||
newbon->HeroicINT += item->HeroicInt;
|
||||
newbon->HeroicWIS += item->HeroicWis;
|
||||
newbon->HeroicCHA += item->HeroicCha;
|
||||
newbon->HeroicMR += item->HeroicMR;
|
||||
newbon->HeroicFR += item->HeroicFR;
|
||||
newbon->HeroicCR += item->HeroicCR;
|
||||
newbon->HeroicPR += item->HeroicPR;
|
||||
newbon->HeroicDR += item->HeroicDR;
|
||||
newbon->HeroicCorrup += item->HeroicSVCorrup;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int lvl = GetLevel();
|
||||
int reclvl = item->RecLevel;
|
||||
|
||||
newbon->AC += CalcRecommendedLevelBonus( lvl, reclvl, item->AC );
|
||||
newbon->HP += CalcRecommendedLevelBonus( lvl, reclvl, item->HP );
|
||||
newbon->Mana += CalcRecommendedLevelBonus( lvl, reclvl, item->Mana );
|
||||
newbon->Endurance += CalcRecommendedLevelBonus( lvl, reclvl, item->Endur );
|
||||
newbon->STR += CalcRecommendedLevelBonus( lvl, reclvl, (item->AStr + item->HeroicStr) );
|
||||
newbon->STA += CalcRecommendedLevelBonus( lvl, reclvl, (item->ASta + item->HeroicSta) );
|
||||
newbon->DEX += CalcRecommendedLevelBonus( lvl, reclvl, (item->ADex + item->HeroicDex) );
|
||||
newbon->AGI += CalcRecommendedLevelBonus( lvl, reclvl, (item->AAgi + item->HeroicAgi) );
|
||||
newbon->INT += CalcRecommendedLevelBonus( lvl, reclvl, (item->AInt + item->HeroicInt) );
|
||||
newbon->WIS += CalcRecommendedLevelBonus( lvl, reclvl, (item->AWis + item->HeroicWis) );
|
||||
newbon->CHA += CalcRecommendedLevelBonus( lvl, reclvl, (item->ACha + item->HeroicCha) );
|
||||
|
||||
newbon->MR += CalcRecommendedLevelBonus( lvl, reclvl, (item->MR + item->HeroicMR) );
|
||||
newbon->FR += CalcRecommendedLevelBonus( lvl, reclvl, (item->FR + item->HeroicFR) );
|
||||
newbon->CR += CalcRecommendedLevelBonus( lvl, reclvl, (item->CR + item->HeroicCR) );
|
||||
newbon->PR += CalcRecommendedLevelBonus( lvl, reclvl, (item->PR + item->HeroicPR) );
|
||||
newbon->DR += CalcRecommendedLevelBonus( lvl, reclvl, (item->DR + item->HeroicDR) );
|
||||
newbon->Corrup += CalcRecommendedLevelBonus( lvl, reclvl, (item->SVCorruption + item->HeroicSVCorrup) );
|
||||
|
||||
newbon->STRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicStr );
|
||||
newbon->STACapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicSta );
|
||||
newbon->DEXCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicDex );
|
||||
newbon->AGICapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicAgi );
|
||||
newbon->INTCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicInt );
|
||||
newbon->WISCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicWis );
|
||||
newbon->CHACapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicCha );
|
||||
newbon->MRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicMR );
|
||||
newbon->CRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicFR );
|
||||
newbon->FRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicCR );
|
||||
newbon->PRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicPR );
|
||||
newbon->DRCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicDR );
|
||||
newbon->CorrupCapMod += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicSVCorrup );
|
||||
|
||||
newbon->HeroicSTR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicStr );
|
||||
newbon->HeroicSTA += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicSta );
|
||||
newbon->HeroicDEX += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicDex );
|
||||
newbon->HeroicAGI += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicAgi );
|
||||
newbon->HeroicINT += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicInt );
|
||||
newbon->HeroicWIS += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicWis );
|
||||
newbon->HeroicCHA += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicCha );
|
||||
newbon->HeroicMR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicMR );
|
||||
newbon->HeroicFR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicFR );
|
||||
newbon->HeroicCR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicCR );
|
||||
newbon->HeroicPR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicPR );
|
||||
newbon->HeroicDR += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicDR );
|
||||
newbon->HeroicCorrup += CalcRecommendedLevelBonus( lvl, reclvl, item->HeroicSVCorrup );
|
||||
}
|
||||
|
||||
//FatherNitwit: New style haste, shields, and regens
|
||||
if(newbon->haste < item->Haste) {
|
||||
newbon->haste = item->Haste;
|
||||
}
|
||||
if(item->Regen > 0)
|
||||
newbon->HPRegen += item->Regen;
|
||||
|
||||
if(item->ManaRegen > 0)
|
||||
newbon->ManaRegen += item->ManaRegen;
|
||||
|
||||
if(item->EnduranceRegen > 0)
|
||||
newbon->EnduranceRegen += item->EnduranceRegen;
|
||||
|
||||
if(item->Attack > 0) {
|
||||
|
||||
unsigned int cap = RuleI(Character, ItemATKCap);
|
||||
cap += itembonuses.ItemATKCap + spellbonuses.ItemATKCap + aabonuses.ItemATKCap;
|
||||
|
||||
if((newbon->ATK + item->Attack) > cap)
|
||||
newbon->ATK = RuleI(Character, ItemATKCap);
|
||||
else
|
||||
newbon->ATK += item->Attack;
|
||||
}
|
||||
if(item->DamageShield > 0) {
|
||||
if((newbon->DamageShield + item->DamageShield) > RuleI(Character, ItemDamageShieldCap))
|
||||
newbon->DamageShield = RuleI(Character, ItemDamageShieldCap);
|
||||
else
|
||||
newbon->DamageShield += item->DamageShield;
|
||||
}
|
||||
if(item->SpellShield > 0) {
|
||||
if((newbon->SpellShield + item->SpellShield) > RuleI(Character, ItemSpellShieldingCap))
|
||||
newbon->SpellShield = RuleI(Character, ItemSpellShieldingCap);
|
||||
else
|
||||
newbon->SpellShield += item->SpellShield;
|
||||
}
|
||||
if(item->Shielding > 0) {
|
||||
if((newbon->MeleeMitigation + item->Shielding) > RuleI(Character, ItemShieldingCap))
|
||||
newbon->MeleeMitigation = RuleI(Character, ItemShieldingCap);
|
||||
else
|
||||
newbon->MeleeMitigation += item->Shielding;
|
||||
}
|
||||
if(item->StunResist > 0) {
|
||||
if((newbon->StunResist + item->StunResist) > RuleI(Character, ItemStunResistCap))
|
||||
newbon->StunResist = RuleI(Character, ItemStunResistCap);
|
||||
else
|
||||
newbon->StunResist += item->StunResist;
|
||||
}
|
||||
if(item->StrikeThrough > 0) {
|
||||
if((newbon->StrikeThrough + item->StrikeThrough) > RuleI(Character, ItemStrikethroughCap))
|
||||
newbon->StrikeThrough = RuleI(Character, ItemStrikethroughCap);
|
||||
else
|
||||
newbon->StrikeThrough += item->StrikeThrough;
|
||||
}
|
||||
if(item->Avoidance > 0) {
|
||||
if((newbon->AvoidMeleeChance + item->Avoidance) > RuleI(Character, ItemAvoidanceCap))
|
||||
newbon->AvoidMeleeChance = RuleI(Character, ItemAvoidanceCap);
|
||||
else
|
||||
newbon->AvoidMeleeChance += item->Avoidance;
|
||||
}
|
||||
if(item->Accuracy > 0) {
|
||||
if((newbon->HitChance + item->Accuracy) > RuleI(Character, ItemAccuracyCap))
|
||||
newbon->HitChance = RuleI(Character, ItemAccuracyCap);
|
||||
else
|
||||
newbon->HitChance += item->Accuracy;
|
||||
}
|
||||
if(item->CombatEffects > 0) {
|
||||
if((newbon->ProcChance + item->CombatEffects) > RuleI(Character, ItemCombatEffectsCap))
|
||||
newbon->ProcChance = RuleI(Character, ItemCombatEffectsCap);
|
||||
else
|
||||
newbon->ProcChance += item->CombatEffects;
|
||||
}
|
||||
if(item->DotShielding > 0) {
|
||||
if((newbon->DoTShielding + item->DotShielding) > RuleI(Character, ItemDoTShieldingCap))
|
||||
newbon->DoTShielding = RuleI(Character, ItemDoTShieldingCap);
|
||||
else
|
||||
newbon->DoTShielding += item->DotShielding;
|
||||
}
|
||||
|
||||
if(item->HealAmt > 0) {
|
||||
if((newbon->HealAmt + item->HealAmt) > RuleI(Character, ItemHealAmtCap))
|
||||
newbon->HealAmt = RuleI(Character, ItemHealAmtCap);
|
||||
else
|
||||
newbon->HealAmt += item->HealAmt;
|
||||
}
|
||||
if(item->SpellDmg > 0) {
|
||||
if((newbon->SpellDmg + item->SpellDmg) > RuleI(Character, ItemSpellDmgCap))
|
||||
newbon->SpellDmg = RuleI(Character, ItemSpellDmgCap);
|
||||
else
|
||||
newbon->SpellDmg += item->SpellDmg;
|
||||
}
|
||||
if(item->Clairvoyance > 0) {
|
||||
if((newbon->Clairvoyance + item->Clairvoyance) > RuleI(Character, ItemClairvoyanceCap))
|
||||
newbon->Clairvoyance = RuleI(Character, ItemClairvoyanceCap);
|
||||
else
|
||||
newbon->Clairvoyance += item->Clairvoyance;
|
||||
}
|
||||
|
||||
if(item->DSMitigation > 0) {
|
||||
if((newbon->DSMitigation + item->DSMitigation) > RuleI(Character, ItemDSMitigationCap))
|
||||
newbon->DSMitigation = RuleI(Character, ItemDSMitigationCap);
|
||||
else
|
||||
newbon->DSMitigation += item->DSMitigation;
|
||||
}
|
||||
if (item->Worn.Effect>0 && (item->Worn.Type == EQ::item::ItemEffectWorn)) { // latent effects
|
||||
ApplySpellsBonuses(item->Worn.Effect, item->Worn.Level, newbon, 0, item->Worn.Type);
|
||||
}
|
||||
|
||||
if (item->Focus.Effect>0 && (item->Focus.Type == EQ::item::ItemEffectFocus)) { // focus effects
|
||||
ApplySpellsBonuses(item->Focus.Effect, item->Focus.Level, newbon, 0);
|
||||
}
|
||||
|
||||
switch(item->BardType)
|
||||
{
|
||||
case 51: /* All (e.g. Singing Short Sword) */
|
||||
{
|
||||
if(item->BardValue > newbon->singingMod)
|
||||
newbon->singingMod = item->BardValue;
|
||||
if(item->BardValue > newbon->brassMod)
|
||||
newbon->brassMod = item->BardValue;
|
||||
if(item->BardValue > newbon->stringedMod)
|
||||
newbon->stringedMod = item->BardValue;
|
||||
if(item->BardValue > newbon->percussionMod)
|
||||
newbon->percussionMod = item->BardValue;
|
||||
if(item->BardValue > newbon->windMod)
|
||||
newbon->windMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case 50: /* Singing */
|
||||
{
|
||||
if(item->BardValue > newbon->singingMod)
|
||||
newbon->singingMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case 23: /* Wind */
|
||||
{
|
||||
if(item->BardValue > newbon->windMod)
|
||||
newbon->windMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case 24: /* stringed */
|
||||
{
|
||||
if(item->BardValue > newbon->stringedMod)
|
||||
newbon->stringedMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case 25: /* brass */
|
||||
{
|
||||
if(item->BardValue > newbon->brassMod)
|
||||
newbon->brassMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
case 26: /* Percussion */
|
||||
{
|
||||
if(item->BardValue > newbon->percussionMod)
|
||||
newbon->percussionMod = item->BardValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (item->SkillModValue != 0 && item->SkillModType <= EQ::skills::HIGHEST_SKILL){
|
||||
if ((item->SkillModValue > 0 && newbon->skillmod[item->SkillModType] < item->SkillModValue) ||
|
||||
(item->SkillModValue < 0 && newbon->skillmod[item->SkillModType] > item->SkillModValue))
|
||||
{
|
||||
newbon->skillmod[item->SkillModType] = item->SkillModValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Add Item Faction Mods
|
||||
if (item->FactionMod1)
|
||||
{
|
||||
if (item->FactionAmt1 > 0 && item->FactionAmt1 > GetItemFactionBonus(item->FactionMod1))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod1, item->FactionAmt1);
|
||||
}
|
||||
else if (item->FactionAmt1 < 0 && item->FactionAmt1 < GetItemFactionBonus(item->FactionMod1))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod1, item->FactionAmt1);
|
||||
}
|
||||
}
|
||||
if (item->FactionMod2)
|
||||
{
|
||||
if (item->FactionAmt2 > 0 && item->FactionAmt2 > GetItemFactionBonus(item->FactionMod2))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod2, item->FactionAmt2);
|
||||
}
|
||||
else if (item->FactionAmt2 < 0 && item->FactionAmt2 < GetItemFactionBonus(item->FactionMod2))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod2, item->FactionAmt2);
|
||||
}
|
||||
}
|
||||
if (item->FactionMod3)
|
||||
{
|
||||
if (item->FactionAmt3 > 0 && item->FactionAmt3 > GetItemFactionBonus(item->FactionMod3))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod3, item->FactionAmt3);
|
||||
}
|
||||
else if (item->FactionAmt3 < 0 && item->FactionAmt3 < GetItemFactionBonus(item->FactionMod3))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod3, item->FactionAmt3);
|
||||
}
|
||||
}
|
||||
if (item->FactionMod4)
|
||||
{
|
||||
if (item->FactionAmt4 > 0 && item->FactionAmt4 > GetItemFactionBonus(item->FactionMod4))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod4, item->FactionAmt4);
|
||||
}
|
||||
else if (item->FactionAmt4 < 0 && item->FactionAmt4 < GetItemFactionBonus(item->FactionMod4))
|
||||
{
|
||||
AddItemFactionBonus(item->FactionMod4, item->FactionAmt4);
|
||||
}
|
||||
}
|
||||
|
||||
if (item->ExtraDmgAmt != 0 && item->ExtraDmgSkill <= EQ::skills::HIGHEST_SKILL) {
|
||||
if (
|
||||
RuleI(Character, ItemExtraDmgCap) >= 0 &&
|
||||
(newbon->SkillDamageAmount[item->ExtraDmgSkill] + item->ExtraDmgAmt) > RuleI(Character, ItemExtraDmgCap)
|
||||
) {
|
||||
newbon->SkillDamageAmount[item->ExtraDmgSkill] = RuleI(Character, ItemExtraDmgCap);
|
||||
} else {
|
||||
newbon->SkillDamageAmount[item->ExtraDmgSkill] += item->ExtraDmgAmt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Merc::GroupLeadershipAAHealthEnhancement()
|
||||
{
|
||||
Group *g = GetGroup();
|
||||
|
||||
@@ -268,10 +268,6 @@ public:
|
||||
bool FindTarget();
|
||||
|
||||
protected:
|
||||
void CalcItemBonuses(StatBonuses* newbon);
|
||||
void AddItemBonuses(const EQ::ItemData *item, StatBonuses* newbon);
|
||||
int CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat);
|
||||
|
||||
int64 GetFocusEffect(focusType type, uint16 spell_id, bool from_buff_tic = false);
|
||||
|
||||
std::vector<MercSpell> merc_spells;
|
||||
|
||||
+88
-65
@@ -16,6 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/misc_functions.h"
|
||||
@@ -130,36 +131,40 @@ Mob::Mob(
|
||||
mMovementManager = &MobMovementManager::Get();
|
||||
mMovementManager->AddMob(this);
|
||||
|
||||
targeted = 0;
|
||||
targeted = 0;
|
||||
currently_fleeing = false;
|
||||
|
||||
AI_Init();
|
||||
SetMoving(false);
|
||||
moved = false;
|
||||
turning = false;
|
||||
m_RewindLocation = glm::vec3();
|
||||
|
||||
moved = false;
|
||||
turning = false;
|
||||
m_RewindLocation = glm::vec3();
|
||||
m_RelativePosition = glm::vec4();
|
||||
|
||||
name[0] = 0;
|
||||
name[0] = 0;
|
||||
orig_name[0] = 0;
|
||||
|
||||
clean_name[0] = 0;
|
||||
lastname[0] = 0;
|
||||
|
||||
if (in_name) {
|
||||
strn0cpy(name, in_name, 64);
|
||||
strn0cpy(orig_name, in_name, 64);
|
||||
}
|
||||
|
||||
if (in_lastname) {
|
||||
strn0cpy(lastname, in_lastname, 64);
|
||||
}
|
||||
current_hp = in_cur_hp;
|
||||
|
||||
current_hp = in_cur_hp;
|
||||
max_hp = in_max_hp;
|
||||
base_hp = in_max_hp;
|
||||
gender = in_gender;
|
||||
race = in_race;
|
||||
base_gender = in_gender;
|
||||
base_race = in_race;
|
||||
use_model = in_usemodel;
|
||||
use_model = in_usemodel;
|
||||
class_ = in_class;
|
||||
bodytype = in_bodytype;
|
||||
orig_bodytype = in_bodytype;
|
||||
@@ -184,8 +189,7 @@ Mob::Mob(
|
||||
fearspeed = 0.625f;
|
||||
base_fearspeed = 25;
|
||||
// npcs
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
base_walkspeed = base_runspeed * 100 / 265;
|
||||
walkspeed = ((float) base_walkspeed) * 0.025f;
|
||||
base_fearspeed = base_runspeed * 100 / 127;
|
||||
@@ -199,7 +203,6 @@ Mob::Mob(
|
||||
|
||||
m_PlayerState = 0;
|
||||
|
||||
|
||||
// sanity check
|
||||
if (runspeed < 0 || runspeed > 20) {
|
||||
runspeed = 1.25f;
|
||||
@@ -219,38 +222,33 @@ Mob::Mob(
|
||||
feettexture = in_feettexture;
|
||||
multitexture = (armtexture || bracertexture || handtexture || legtexture || feettexture);
|
||||
|
||||
haircolor = in_haircolor;
|
||||
beardcolor = in_beardcolor;
|
||||
eyecolor1 = in_eyecolor1;
|
||||
eyecolor2 = in_eyecolor2;
|
||||
hairstyle = in_hairstyle;
|
||||
luclinface = in_luclinface;
|
||||
beard = in_beard;
|
||||
drakkin_heritage = in_drakkin_heritage;
|
||||
drakkin_tattoo = in_drakkin_tattoo;
|
||||
drakkin_details = in_drakkin_details;
|
||||
attack_speed = 0;
|
||||
attack_delay = 0;
|
||||
slow_mitigation = 0;
|
||||
findable = false;
|
||||
trackable = true;
|
||||
has_shieldequiped = false;
|
||||
has_twohandbluntequiped = false;
|
||||
has_twohanderequipped = false;
|
||||
has_duelweaponsequiped = false;
|
||||
can_facestab = false;
|
||||
has_numhits = false;
|
||||
has_MGB = false;
|
||||
has_ProjectIllusion = false;
|
||||
SpellPowerDistanceMod = 0;
|
||||
last_los_check = false;
|
||||
haircolor = in_haircolor;
|
||||
beardcolor = in_beardcolor;
|
||||
eyecolor1 = in_eyecolor1;
|
||||
eyecolor2 = in_eyecolor2;
|
||||
hairstyle = in_hairstyle;
|
||||
luclinface = in_luclinface;
|
||||
beard = in_beard;
|
||||
drakkin_heritage = in_drakkin_heritage;
|
||||
drakkin_tattoo = in_drakkin_tattoo;
|
||||
drakkin_details = in_drakkin_details;
|
||||
attack_speed = 0;
|
||||
attack_delay = 0;
|
||||
slow_mitigation = 0;
|
||||
findable = false;
|
||||
trackable = true;
|
||||
has_shield_equipped = false;
|
||||
has_two_hand_blunt_equipped = false;
|
||||
has_two_hander_equipped = false;
|
||||
has_dual_weapons_equipped = false;
|
||||
can_facestab = false;
|
||||
has_numhits = false;
|
||||
has_MGB = false;
|
||||
has_ProjectIllusion = false;
|
||||
SpellPowerDistanceMod = 0;
|
||||
last_los_check = false;
|
||||
|
||||
if (in_aa_title > 0) {
|
||||
aa_title = in_aa_title;
|
||||
}
|
||||
else {
|
||||
aa_title = 0xFF;
|
||||
}
|
||||
aa_title = in_aa_title > 0 ? in_aa_title : 0xFF;
|
||||
|
||||
AC = in_ac;
|
||||
ATK = in_atk;
|
||||
@@ -427,24 +425,24 @@ Mob::Mob(
|
||||
permarooted = (runspeed > 0) ? false : true;
|
||||
|
||||
pause_timer_complete = false;
|
||||
ForcedMovement = 0;
|
||||
roamer = false;
|
||||
rooted = false;
|
||||
charmed = false;
|
||||
ForcedMovement = 0;
|
||||
roamer = false;
|
||||
rooted = false;
|
||||
charmed = false;
|
||||
|
||||
weaponstance.enabled = false;
|
||||
weaponstance.spellbonus_enabled = false; //Set when bonus is applied
|
||||
weaponstance.itembonus_enabled = false; //Set when bonus is applied
|
||||
weaponstance.aabonus_enabled = false; //Controlled by function TogglePassiveAA
|
||||
weaponstance.enabled = false;
|
||||
weaponstance.spellbonus_enabled = false; //Set when bonus is applied
|
||||
weaponstance.itembonus_enabled = false; //Set when bonus is applied
|
||||
weaponstance.aabonus_enabled = false; //Controlled by function TogglePassiveAA
|
||||
weaponstance.spellbonus_buff_spell_id = 0;
|
||||
weaponstance.itembonus_buff_spell_id = 0;
|
||||
weaponstance.aabonus_buff_spell_id = 0;
|
||||
weaponstance.itembonus_buff_spell_id = 0;
|
||||
weaponstance.aabonus_buff_spell_id = 0;
|
||||
|
||||
pStandingPetOrder = SPO_Follow;
|
||||
pseudo_rooted = false;
|
||||
|
||||
nobuff_invisible = 0;
|
||||
see_invis = 0;
|
||||
see_invis = 0;
|
||||
|
||||
innate_see_invis = GetSeeInvisibleLevelFromNPCStat(in_see_invis);
|
||||
see_invis_undead = GetSeeInvisibleLevelFromNPCStat(in_see_invis_undead);
|
||||
@@ -491,19 +489,19 @@ Mob::Mob(
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_APPEARANCE_EFFECTS; i++) {
|
||||
appearance_effects_id[i] = 0;
|
||||
appearance_effects_id[i] = 0;
|
||||
appearance_effects_slot[i] = 0;
|
||||
}
|
||||
|
||||
emoteid = 0;
|
||||
endur_upkeep = false;
|
||||
degenerating_effects = false;
|
||||
PrimaryAggro = false;
|
||||
AssistAggro = false;
|
||||
npc_assist_cap = 0;
|
||||
PrimaryAggro = false;
|
||||
AssistAggro = false;
|
||||
npc_assist_cap = 0;
|
||||
|
||||
use_double_melee_round_dmg_bonus = false;
|
||||
dw_same_delay = 0;
|
||||
dw_same_delay = 0;
|
||||
|
||||
queue_wearchange_slot = -1;
|
||||
|
||||
@@ -3999,7 +3997,7 @@ void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::O
|
||||
|
||||
const char *Mob::GetCleanName()
|
||||
{
|
||||
if (!strlen(clean_name)) {
|
||||
if (!strlen(clean_name)) {
|
||||
CleanMobName(GetName(), clean_name);
|
||||
}
|
||||
|
||||
@@ -5549,16 +5547,41 @@ int16 Mob::GetSkillReuseTime(uint16 skill)
|
||||
return skill_reduction;
|
||||
}
|
||||
|
||||
int Mob::GetSkillDmgAmt(uint16 skill)
|
||||
int Mob::GetSkillDmgAmt(int skill_id)
|
||||
{
|
||||
int skill_dmg = 0;
|
||||
|
||||
// All skill dmg(only spells do this) + Skill specific
|
||||
skill_dmg += spellbonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1] + itembonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1]
|
||||
+ itembonuses.SkillDamageAmount[skill] + spellbonuses.SkillDamageAmount[skill] + aabonuses.SkillDamageAmount[skill];
|
||||
if (!EQ::ValueWithin(skill_id, ALL_SKILLS, EQ::skills::HIGHEST_SKILL)) {
|
||||
return skill_dmg;
|
||||
}
|
||||
|
||||
skill_dmg += spellbonuses.SkillDamageAmount2[EQ::skills::HIGHEST_SKILL + 1] + itembonuses.SkillDamageAmount2[EQ::skills::HIGHEST_SKILL + 1]
|
||||
+ itembonuses.SkillDamageAmount2[skill] + spellbonuses.SkillDamageAmount2[skill];
|
||||
skill_dmg += (
|
||||
spellbonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1] +
|
||||
itembonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1] +
|
||||
aabonuses.SkillDamageAmount[EQ::skills::HIGHEST_SKILL + 1]
|
||||
);
|
||||
|
||||
if (skill_id != ALL_SKILLS) {
|
||||
skill_dmg += (
|
||||
itembonuses.SkillDamageAmount[skill_id] +
|
||||
spellbonuses.SkillDamageAmount[skill_id] +
|
||||
aabonuses.SkillDamageAmount[skill_id]
|
||||
);
|
||||
}
|
||||
|
||||
skill_dmg += (
|
||||
spellbonuses.SkillDamageAmount2[EQ::skills::HIGHEST_SKILL + 1] +
|
||||
itembonuses.SkillDamageAmount2[EQ::skills::HIGHEST_SKILL + 1] +
|
||||
aabonuses.SkillDamageAmount2[EQ::skills::HIGHEST_SKILL + 1]
|
||||
);
|
||||
|
||||
if (skill_id != ALL_SKILLS) {
|
||||
skill_dmg += (
|
||||
itembonuses.SkillDamageAmount2[skill_id] +
|
||||
spellbonuses.SkillDamageAmount2[skill_id] +
|
||||
aabonuses.SkillDamageAmount2[skill_id]
|
||||
);
|
||||
}
|
||||
|
||||
return skill_dmg;
|
||||
}
|
||||
@@ -7115,4 +7138,4 @@ int Mob::DispatchZoneControllerEvent(
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+18
-15
@@ -484,19 +484,19 @@ public:
|
||||
void TempName(const char *newname = nullptr);
|
||||
void SetTargetable(bool on);
|
||||
bool IsTargetable() const { return m_targetable; }
|
||||
bool HasShieldEquiped() const { return has_shieldequiped; }
|
||||
inline void SetShieldEquiped(bool val) { has_shieldequiped = val; }
|
||||
bool HasTwoHandBluntEquiped() const { return has_twohandbluntequiped; }
|
||||
inline void SetTwoHandBluntEquiped(bool val) { has_twohandbluntequiped = val; }
|
||||
bool HasTwoHanderEquipped() { return has_twohanderequipped; }
|
||||
void SetTwoHanderEquipped(bool val) { has_twohanderequipped = val; }
|
||||
bool HasDualWeaponsEquiped() const { return has_duelweaponsequiped; }
|
||||
bool HasShieldEquipped() const { return has_shield_equipped; }
|
||||
inline void SetShieldEquipped(bool val) { has_shield_equipped = val; }
|
||||
bool HasTwoHandBluntEquipped() const { return has_two_hand_blunt_equipped; }
|
||||
inline void SetTwoHandBluntEquipped(bool val) { has_two_hand_blunt_equipped = val; }
|
||||
bool HasTwoHanderEquipped() { return has_two_hander_equipped; }
|
||||
void SetTwoHanderEquipped(bool val) { has_two_hander_equipped = val; }
|
||||
bool HasDualWeaponsEquipped() const { return has_dual_weapons_equipped; }
|
||||
bool HasBowEquipped() const { return has_bowequipped; }
|
||||
void SetBowEquipped(bool val) { has_bowequipped = val; }
|
||||
bool HasArrowEquipped() const { return has_arrowequipped; }
|
||||
void SetArrowEquipped(bool val) { has_arrowequipped = val; }
|
||||
bool HasBowAndArrowEquipped() const { return HasBowEquipped() && HasArrowEquipped(); }
|
||||
inline void SetDuelWeaponsEquiped(bool val) { has_duelweaponsequiped = val; }
|
||||
inline void SetDualWeaponsEquipped(bool val) { has_dual_weapons_equipped = val; }
|
||||
bool CanFacestab() { return can_facestab; }
|
||||
void SetFacestab(bool val) { can_facestab = val; }
|
||||
virtual uint8 ConvertItemTypeToSkillID(uint8 item_type);
|
||||
@@ -664,8 +664,6 @@ public:
|
||||
virtual int32 CalcItemATKCap() { return 0; }
|
||||
virtual bool IsSitting() const { return false; }
|
||||
|
||||
int CalcRecommendedLevelBonus(uint8 level, uint8 reclevel, int basestat);
|
||||
|
||||
void CopyHateList(Mob* to);
|
||||
|
||||
//Group
|
||||
@@ -953,7 +951,7 @@ public:
|
||||
int16 GetMeleeDmgPositionMod(Mob* defender);
|
||||
int16 GetSkillReuseTime(uint16 skill);
|
||||
int GetCriticalChanceBonus(uint16 skill);
|
||||
int GetSkillDmgAmt(uint16 skill);
|
||||
int GetSkillDmgAmt(int skill_id);
|
||||
int16 GetPositionalDmgAmt(Mob* defender);
|
||||
inline bool CanBlockSpell() const { return(spellbonuses.FocusEffects[focusBlockNextSpell]); }
|
||||
bool DoHPToManaCovert(int32 mana_cost = 0);
|
||||
@@ -1378,6 +1376,11 @@ public:
|
||||
void ApplyAABonuses(const AA::Rank &rank, StatBonuses* newbon);
|
||||
bool CheckAATimer(int timer);
|
||||
|
||||
void CalcItemBonuses(StatBonuses* b);
|
||||
void AddItemBonuses(const EQ::ItemInstance* inst, StatBonuses* b, bool is_augment = false, bool is_tribute = false, int recommended_level_override = 0, bool is_ammo_item = false);
|
||||
void AdditiveWornBonuses(const EQ::ItemInstance* inst, StatBonuses* b, bool is_augment = false);
|
||||
int CalcRecommendedLevelBonus(uint8 current_level, uint8 recommended_level, int base_stat);
|
||||
|
||||
int NPCAssistCap() { return npc_assist_cap; }
|
||||
void AddAssistCap() { ++npc_assist_cap; }
|
||||
void DelAssistCap() { --npc_assist_cap; }
|
||||
@@ -1696,10 +1699,10 @@ protected:
|
||||
bool silenced;
|
||||
bool amnesiad;
|
||||
bool offhand;
|
||||
bool has_shieldequiped;
|
||||
bool has_twohandbluntequiped;
|
||||
bool has_twohanderequipped;
|
||||
bool has_duelweaponsequiped;
|
||||
bool has_shield_equipped;
|
||||
bool has_two_hand_blunt_equipped;
|
||||
bool has_two_hander_equipped;
|
||||
bool has_dual_weapons_equipped;
|
||||
bool has_bowequipped = false;
|
||||
bool has_arrowequipped = false;
|
||||
bool use_double_melee_round_dmg_bonus;
|
||||
|
||||
@@ -162,7 +162,6 @@ public:
|
||||
virtual void SetTarget(Mob* mob);
|
||||
virtual uint16 GetSkill(EQ::skills::SkillType skill_num) const { if (skill_num <= EQ::skills::HIGHEST_SKILL) { return skills[skill_num]; } return 0; }
|
||||
|
||||
void CalcItemBonuses(StatBonuses *newbon);
|
||||
virtual void CalcBonuses();
|
||||
virtual int GetCurrentBuffSlots() const { return RuleI(Spells, MaxBuffSlotsNPC); }
|
||||
virtual int GetCurrentSongSlots() const { return RuleI(Spells, MaxSongSlotsNPC); }
|
||||
|
||||
+7
-7
@@ -2273,14 +2273,14 @@ bool Perl_Mob_IsTargetable(Mob* self) // @categories Stats and Attributes
|
||||
return self->IsTargetable();
|
||||
}
|
||||
|
||||
bool Perl_Mob_HasShieldEquiped(Mob* self) // @categories Stats and Attributes
|
||||
bool Perl_Mob_HasShieldEquipped(Mob* self) // @categories Stats and Attributes
|
||||
{
|
||||
return self->HasShieldEquiped();
|
||||
return self->HasShieldEquipped();
|
||||
}
|
||||
|
||||
bool Perl_Mob_HasTwoHandBluntEquiped(Mob* self) // @categories Stats and Attributes
|
||||
bool Perl_Mob_HasTwoHandBluntEquipped(Mob* self) // @categories Stats and Attributes
|
||||
{
|
||||
return self->HasTwoHandBluntEquiped();
|
||||
return self->HasTwoHandBluntEquipped();
|
||||
}
|
||||
|
||||
bool Perl_Mob_HasTwoHanderEquipped(Mob* self) // @categories Stats and Attributes
|
||||
@@ -2517,7 +2517,7 @@ void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id, int duration) // @categori
|
||||
self->ApplySpellBuff(spell_id, duration);
|
||||
}
|
||||
|
||||
int Perl_Mob_GetSkillDmgAmt(Mob* self, uint16 skill_id)
|
||||
int Perl_Mob_GetSkillDmgAmt(Mob* self, int skill_id)
|
||||
{
|
||||
return self->GetSkillDmgAmt(skill_id);
|
||||
}
|
||||
@@ -3257,9 +3257,9 @@ void perl_register_mob()
|
||||
package.add("HasOwner", &Perl_Mob_HasOwner);
|
||||
package.add("HasPet", &Perl_Mob_HasPet);
|
||||
package.add("HasProcs", &Perl_Mob_HasProcs);
|
||||
package.add("HasShieldEquiped", &Perl_Mob_HasShieldEquiped);
|
||||
package.add("HasShieldEquipped", &Perl_Mob_HasShieldEquipped);
|
||||
package.add("HasTimer", &Perl_Mob_HasTimer);
|
||||
package.add("HasTwoHandBluntEquiped", &Perl_Mob_HasTwoHandBluntEquiped);
|
||||
package.add("HasTwoHandBluntEquipped", &Perl_Mob_HasTwoHandBluntEquipped);
|
||||
package.add("HasTwoHanderEquipped", &Perl_Mob_HasTwoHanderEquipped);
|
||||
package.add("HateSummon", &Perl_Mob_HateSummon);
|
||||
package.add("Heal", &Perl_Mob_Heal);
|
||||
|
||||
+7
-3
@@ -448,9 +448,13 @@ void QuestManager::ZoneRaid(const char *zone_name) {
|
||||
initiator->MoveZone(zone_name);
|
||||
} else {
|
||||
auto client_raid = initiator->GetRaid();
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
raid_member->MoveZone(zone_name);
|
||||
}
|
||||
}
|
||||
|
||||
+43
-4
@@ -611,9 +611,8 @@ void Raid::RaidGroupSay(const char *msg, Client *c, uint8 language, uint8 lang_s
|
||||
|
||||
uint32 Raid::GetPlayerIndex(const char *name)
|
||||
{
|
||||
for(int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if(strcmp(name, members[x].member_name) == 0) {
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++) {
|
||||
if (strcmp(name, members[x].member_name) == 0) {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
@@ -832,6 +831,10 @@ void Raid::BalanceMana(int32 penalty, uint32 gid, float range, Mob* caster, int3
|
||||
manataken /= numMem;
|
||||
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.group_number == gid) {
|
||||
distance = DistanceSquared(caster->GetPosition(), m.member->GetPosition());
|
||||
|
||||
@@ -875,6 +878,10 @@ void Raid::SplitMoney(uint32 gid, uint32 copper, uint32 silver, uint32 gold, uin
|
||||
|
||||
uint8 member_count = 0;
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.group_number == gid && m.member->IsClient()) {
|
||||
member_count++;
|
||||
}
|
||||
@@ -914,6 +921,10 @@ void Raid::SplitMoney(uint32 gid, uint32 copper, uint32 silver, uint32 gold, uin
|
||||
auto platinum_split = platinum / member_count;
|
||||
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.group_number == gid && m.member->IsClient()) { // If Group Member is Client
|
||||
m.member->AddMoneyToPP(
|
||||
copper_split,
|
||||
@@ -952,6 +963,10 @@ void Raid::SplitMoney(uint32 gid, uint32 copper, uint32 silver, uint32 gold, uin
|
||||
void Raid::TeleportGroup(Mob* sender, uint32 zoneID, uint16 instance_id, float x, float y, float z, float heading, uint32 gid)
|
||||
{
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.group_number == gid && m.member->IsClient()) {
|
||||
m.member->MovePC(zoneID, instance_id, x, y, z, heading, 0, ZoneSolicited);
|
||||
}
|
||||
@@ -961,6 +976,10 @@ void Raid::TeleportGroup(Mob* sender, uint32 zoneID, uint16 instance_id, float x
|
||||
void Raid::TeleportRaid(Mob* sender, uint32 zoneID, uint16 instance_id, float x, float y, float z, float heading)
|
||||
{
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
m.member->MovePC(zoneID, instance_id, x, y, z, heading, 0, ZoneSolicited);
|
||||
}
|
||||
@@ -981,6 +1000,10 @@ void Raid::AddRaidLooter(const char* looter)
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
for (auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(looter, m.member_name) == 0) {
|
||||
m.is_looter = true;
|
||||
break;
|
||||
@@ -1002,6 +1025,10 @@ void Raid::RemoveRaidLooter(const char* looter)
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
for (auto& m: members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(looter, m.member_name) == 0) {
|
||||
m.is_looter = false;
|
||||
break;
|
||||
@@ -1258,6 +1285,10 @@ void Raid::SendBulkRaid(Client *to)
|
||||
void Raid::QueuePacket(const EQApplicationPacket *app, bool ack_req)
|
||||
{
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
m.member->QueuePacket(app, ack_req);
|
||||
}
|
||||
@@ -1332,7 +1363,7 @@ void Raid::SendGroupUpdate(Client *to)
|
||||
gu->action = groupActUpdate;
|
||||
int i = 0;
|
||||
uint32 grp = GetGroup(to->GetName());
|
||||
if (grp >= MAX_RAID_MEMBERS) {
|
||||
if (grp >= MAX_RAID_GROUPS) {
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
@@ -1502,6 +1533,10 @@ void Raid::SendRaidMOTD()
|
||||
}
|
||||
|
||||
for (const auto& m: members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member) {
|
||||
SendRaidMOTD(m.member);
|
||||
}
|
||||
@@ -1911,6 +1946,10 @@ const char *Raid::GetClientNameByIndex(uint8 index)
|
||||
void Raid::RaidMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance)
|
||||
{
|
||||
for (const auto& m : members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient() && m.member != sender) {
|
||||
m.member->MessageString(type, string_id, message, message2, message3, message4, message5, message6,
|
||||
message7, message8, message9, distance);
|
||||
|
||||
@@ -133,7 +133,7 @@ int Mob::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target)
|
||||
float ac_bonus = 0.0f;
|
||||
const EQ::ItemInstance *inst = nullptr;
|
||||
if (IsClient()) {
|
||||
if (HasShieldEquiped()) {
|
||||
if (HasShieldEquipped()) {
|
||||
inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary);
|
||||
} else if (HasTwoHanderEquipped()) {
|
||||
inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary);
|
||||
|
||||
@@ -8075,8 +8075,8 @@ bool Mob::PassCastRestriction(int value)
|
||||
return true;
|
||||
break;
|
||||
|
||||
case IS_OFF_HAND_EQUIPED:
|
||||
if (HasShieldEquiped() || CanThisClassDualWield())
|
||||
case IS_OFF_HAND_EQUIPPED:
|
||||
if (HasShieldEquipped() || CanThisClassDualWield())
|
||||
return true;
|
||||
break;
|
||||
|
||||
@@ -9284,7 +9284,7 @@ void Mob::SendCastRestrictionMessage(int requirement_id, bool target_requirement
|
||||
case IS_HP_UNDER_50_PCT:
|
||||
Message(Chat::Red, fmt::format("{} This target must be at oe below 50 pct of its maximum hit points.", msg).c_str());
|
||||
break;
|
||||
case IS_OFF_HAND_EQUIPED:
|
||||
case IS_OFF_HAND_EQUIPPED:
|
||||
Message(Chat::Red, fmt::format("{} You must be wielding a weapon or shield in your offhand to use this ability.", msg).c_str());
|
||||
break;
|
||||
case HAS_NO_PACT_OF_FATE_RECOURSE_BUFF:
|
||||
|
||||
+3
-2
@@ -437,9 +437,10 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
//this is a special case for NPCs with no mana...
|
||||
if (IsNPC() && my_curmana == my_maxmana) {
|
||||
mana_cost = 0;
|
||||
} else {
|
||||
DoSpellInterrupt(spell_id, mana_cost, my_curmana);
|
||||
return false;
|
||||
}
|
||||
DoSpellInterrupt(spell_id, mana_cost, my_curmana);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -920,7 +920,7 @@ int64 Mob::TuneClientAttack(Mob* other, bool no_avoid, bool no_hit_chance, int h
|
||||
if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary)
|
||||
my_hit.base_damage = CastToClient()->DoDamageCaps(my_hit.base_damage);
|
||||
auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod;
|
||||
if (shield_inc > 0 && HasShieldEquiped() && Hand == EQ::invslot::slotPrimary) {
|
||||
if (shield_inc > 0 && HasShieldEquipped() && Hand == EQ::invslot::slotPrimary) {
|
||||
my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100;
|
||||
hate = hate * (100 + shield_inc) / 100;
|
||||
}
|
||||
@@ -1040,7 +1040,7 @@ int64 Mob::TuneACSum(bool skip_caps, int ac_override, int add_ac)
|
||||
}
|
||||
|
||||
int shield_ac = 0;
|
||||
if (HasShieldEquiped() && IsOfClientBot()) {
|
||||
if (HasShieldEquipped() && IsOfClientBot()) {
|
||||
auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary);
|
||||
if (inst) {
|
||||
if (inst->GetItemRecommendedLevel(true) <= GetLevel()) {
|
||||
|
||||
+138
-103
@@ -294,12 +294,19 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
case VoiceMacroRaid: {
|
||||
Raid *r = entity_list.GetRaidByID(svm->RaidID);
|
||||
|
||||
if (!r)
|
||||
if (!r) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; i++)
|
||||
if (r->members[i].member)
|
||||
r->members[i].member->QueuePacket(outapp);
|
||||
for (const auto& m: r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member) {
|
||||
m.member->QueuePacket(outapp);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1055,7 +1062,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
{
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupJoin_Struct));
|
||||
GroupJoin_Struct* outgj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
auto outgj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
strcpy(outgj->membername, Inviter->GetName());
|
||||
strcpy(outgj->yourname, Inviter->GetName());
|
||||
outgj->action = groupActInviteInitial; // 'You have formed the group'.
|
||||
@@ -1095,7 +1102,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
Inviter->CastToClient()->UpdateLFP();
|
||||
|
||||
auto pack2 = new ServerPacket(ServerOP_GroupJoin, sizeof(ServerGroupJoin_Struct));
|
||||
ServerGroupJoin_Struct* gj = (ServerGroupJoin_Struct*)pack2->pBuffer;
|
||||
auto gj = (ServerGroupJoin_Struct*)pack2->pBuffer;
|
||||
gj->gid = group->GetID();
|
||||
gj->zoneid = zone->GetZoneID();
|
||||
gj->instance_id = zone->GetInstanceID();
|
||||
@@ -1213,7 +1220,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_GroupJoin: {
|
||||
ServerGroupJoin_Struct* gj = (ServerGroupJoin_Struct*)pack->pBuffer;
|
||||
auto gj = (ServerGroupJoin_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (gj->zoneid == zone->GetZoneID() && gj->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1259,7 +1266,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidAdd: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1274,7 +1281,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidRemove: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1294,7 +1301,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidDisband: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1309,7 +1316,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidLockFlag: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1326,7 +1333,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidChangeGroup: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1354,7 +1361,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_UpdateGroup: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1367,7 +1374,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidGroupLeader: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1375,7 +1382,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidLeader: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1395,7 +1402,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_DetailsChange: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1410,7 +1417,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidGroupDisband: {
|
||||
ServerRaidGeneralAction_Struct* rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
if (rga->zoneid == zone->GetZoneID() && rga->instance_id == zone->GetInstanceID())
|
||||
break;
|
||||
@@ -1420,7 +1427,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
{
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupUpdate_Struct));
|
||||
GroupUpdate_Struct* gu = (GroupUpdate_Struct*)outapp->pBuffer;
|
||||
auto gu = (GroupUpdate_Struct*)outapp->pBuffer;
|
||||
gu->action = groupActDisband;
|
||||
strn0cpy(gu->leadersname, c->GetName(), 64);
|
||||
strn0cpy(gu->yourname, c->GetName(), 64);
|
||||
@@ -1430,27 +1437,26 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidGroupAdd: {
|
||||
ServerRaidGroupAction_Struct* rga = (ServerRaidGroupAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGroupAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
Raid *r = entity_list.GetRaidByID(rga->rid);
|
||||
if (r) {
|
||||
r->LearnMembers();
|
||||
r->VerifyRaid();
|
||||
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupJoin_Struct));
|
||||
GroupJoin_Struct* gj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
auto gj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
strn0cpy(gj->membername, rga->membername, 64);
|
||||
gj->action = groupActJoin;
|
||||
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if (r->members[x].member)
|
||||
{
|
||||
if (strcmp(r->members[x].member->GetName(), rga->membername) != 0) {
|
||||
if ((rga->gid < 12) && rga->gid == r->members[x].group_number)
|
||||
{
|
||||
strn0cpy(gj->yourname, r->members[x].member->GetName(), 64);
|
||||
r->members[x].member->QueuePacket(outapp);
|
||||
}
|
||||
for (const auto& m : r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && strcmp(m.member->GetName(), rga->membername) != 0) {
|
||||
if ((rga->gid < MAX_RAID_GROUPS) && rga->gid == m.group_number) {
|
||||
strn0cpy(gj->yourname, m.member->GetName(), 64);
|
||||
m.member->QueuePacket(outapp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1460,27 +1466,26 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidGroupRemove: {
|
||||
ServerRaidGroupAction_Struct* rga = (ServerRaidGroupAction_Struct*)pack->pBuffer;
|
||||
auto rga = (ServerRaidGroupAction_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
Raid *r = entity_list.GetRaidByID(rga->rid);
|
||||
if (r) {
|
||||
r->LearnMembers();
|
||||
r->VerifyRaid();
|
||||
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupJoin_Struct));
|
||||
GroupJoin_Struct* gj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
auto gj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
strn0cpy(gj->membername, rga->membername, 64);
|
||||
gj->action = groupActLeave;
|
||||
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if (r->members[x].member)
|
||||
{
|
||||
if (strcmp(r->members[x].member->GetName(), rga->membername) != 0) {
|
||||
if ((rga->gid < 12) && rga->gid == r->members[x].group_number)
|
||||
{
|
||||
strn0cpy(gj->yourname, r->members[x].member->GetName(), 64);
|
||||
r->members[x].member->QueuePacket(outapp);
|
||||
}
|
||||
for (const auto& m : r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && strcmp(m.member->GetName(), rga->membername) != 0) {
|
||||
if ((rga->gid < MAX_RAID_GROUPS) && rga->gid == m.group_number) {
|
||||
strn0cpy(gj->yourname, m.member->GetName(), 64);
|
||||
m.member->QueuePacket(outapp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1490,21 +1495,19 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidGroupSay: {
|
||||
ServerRaidMessage_Struct* rmsg = (ServerRaidMessage_Struct*)pack->pBuffer;
|
||||
auto rmsg = (ServerRaidMessage_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
Raid *r = entity_list.GetRaidByID(rmsg->rid);
|
||||
if (r)
|
||||
{
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if (r->members[x].member) {
|
||||
if (strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
|
||||
{
|
||||
if (r->members[x].group_number == rmsg->gid) {
|
||||
if (!r->members[x].is_bot && r->members[x].member->GetFilter(FilterGroupChat) != 0)
|
||||
{
|
||||
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), ChatChannel_Group, rmsg->language, rmsg->lang_skill, rmsg->message);
|
||||
}
|
||||
if (r) {
|
||||
for (const auto& m :r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && strcmp(m.member->GetName(), rmsg->from) != 0) {
|
||||
if (m.group_number == rmsg->gid) {
|
||||
if (m.member->GetFilter(FilterGroupChat) != 0) {
|
||||
m.member->ChannelMessageSend(rmsg->from, m.member->GetName(), ChatChannel_Group, rmsg->language, rmsg->lang_skill, rmsg->message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1514,20 +1517,20 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_RaidSay: {
|
||||
ServerRaidMessage_Struct* rmsg = (ServerRaidMessage_Struct*)pack->pBuffer;
|
||||
if (zone)
|
||||
{
|
||||
auto rmsg = (ServerRaidMessage_Struct*)pack->pBuffer;
|
||||
if (zone) {
|
||||
Raid *r = entity_list.GetRaidByID(rmsg->rid);
|
||||
if (r)
|
||||
{
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
|
||||
{
|
||||
if (r->members[x].member) {
|
||||
if (strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
|
||||
{
|
||||
if (!r->members[x].is_bot && r->members[x].member->GetFilter(FilterGroupChat) != 0)
|
||||
{
|
||||
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), ChatChannel_Raid, rmsg->language, rmsg->lang_skill, rmsg->message);
|
||||
|
||||
if (r) {
|
||||
for (const auto& m :r->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member) {
|
||||
if (strcmp(rmsg->from, m.member->GetName()) != 0) {
|
||||
if (!m.is_bot && m.member->GetFilter(FilterGroupChat) != 0) {
|
||||
m.member->ChannelMessageSend(rmsg->from, m.member->GetName(), ChatChannel_Raid, rmsg->language, rmsg->lang_skill, rmsg->message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2144,10 +2147,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
DialogueWindow::Render(raid_member, message);
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
DialogueWindow::Render( m.member->CastToClient(), message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2235,24 +2241,27 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
auto client_raid_member = client_raid->members[member_index].member;
|
||||
if (client_raid_member && client_raid_member->IsClient()) {
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
switch (update_subtype) {
|
||||
case CZLDoNUpdateSubtype_AddLoss:
|
||||
client_raid_member->UpdateLDoNWinLoss(theme_id, false);
|
||||
m.member->UpdateLDoNWinLoss(theme_id, false);
|
||||
break;
|
||||
case CZLDoNUpdateSubtype_AddPoints:
|
||||
client_raid_member->UpdateLDoNPoints(theme_id, points);
|
||||
m.member->UpdateLDoNPoints(theme_id, points);
|
||||
break;
|
||||
case CZLDoNUpdateSubtype_AddWin:
|
||||
client_raid_member->UpdateLDoNWinLoss(theme_id, true);
|
||||
m.member->UpdateLDoNWinLoss(theme_id, true);
|
||||
break;
|
||||
case CZLDoNUpdateSubtype_RemoveLoss:
|
||||
client_raid_member->UpdateLDoNWinLoss(theme_id, false, true);
|
||||
m.member->UpdateLDoNWinLoss(theme_id, false, true);
|
||||
break;
|
||||
case CZLDoNUpdateSubtype_RemoveWin:
|
||||
client_raid_member->UpdateLDoNWinLoss(theme_id, true, true);
|
||||
m.member->UpdateLDoNWinLoss(theme_id, true, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2365,9 +2374,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
raid_member->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message);
|
||||
}
|
||||
}
|
||||
@@ -2418,9 +2431,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
raid_member->Message(type, message);
|
||||
}
|
||||
}
|
||||
@@ -2486,9 +2503,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
switch (update_subtype) {
|
||||
case CZMoveUpdateSubtype_MoveZone:
|
||||
raid_member->MoveZone(zone_short_name);
|
||||
@@ -2567,9 +2588,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
raid_member->SetEntityVariable(variable_name, variable_value);
|
||||
}
|
||||
}
|
||||
@@ -2601,7 +2626,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
}
|
||||
case ServerOP_CZSignal:
|
||||
{
|
||||
CZSignal_Struct* CZS = (CZSignal_Struct*) pack->pBuffer;
|
||||
auto CZS = (CZSignal_Struct*) pack->pBuffer;
|
||||
uint8 update_type = CZS->update_type;
|
||||
int update_identifier = CZS->update_identifier;
|
||||
int signal_id = CZS->signal_id;
|
||||
@@ -2624,10 +2649,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
raid_member->Signal(signal_id);
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
m.member->CastToClient()->Signal(signal_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2696,9 +2724,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
switch (update_subtype) {
|
||||
case CZSpellUpdateSubtype_Cast:
|
||||
raid_member->ApplySpellBuff(spell_id);
|
||||
@@ -2825,9 +2857,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
} else if (update_type == CZUpdateType_Raid) {
|
||||
auto client_raid = entity_list.GetRaidByID(update_identifier);
|
||||
if (client_raid) {
|
||||
for (int member_index = 0; member_index < MAX_RAID_MEMBERS; member_index++) {
|
||||
if (client_raid->members[member_index].member && client_raid->members[member_index].member->IsClient()) {
|
||||
auto raid_member = client_raid->members[member_index].member->CastToClient();
|
||||
for (const auto& m : client_raid->members) {
|
||||
if (m.is_bot) {
|
||||
continue;
|
||||
}
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto raid_member = m.member->CastToClient();
|
||||
switch (update_subtype) {
|
||||
case CZTaskUpdateSubtype_ActivityReset:
|
||||
raid_member->ResetTaskActivity(task_identifier, task_subidentifier);
|
||||
|
||||
+1
-1
@@ -1262,7 +1262,7 @@ bool Client::CanEnterZone(const std::string& zone_short_name, int16 instance_ver
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && Strings::ToInt(z->flag_needed) == 1) {
|
||||
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && Strings::ToBool(z->flag_needed)) {
|
||||
if (Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(z->zoneidnumber)) {
|
||||
LogInfo(
|
||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||
|
||||
Reference in New Issue
Block a user