10629 Commits

Author SHA1 Message Date
Alex King
26c267db1b
[Cleanup] "equipped" not "equiped", "dual" not "duel". (#3149)
* [Cleanup] "equipped" not "equiped", "dual" not "duel".

# Notes
- These are spelled incorrectly.

* Update spdat.h

* Formatting further.

* Update api_service.cpp
2023-03-27 17:55:37 -04:00
Aeadoin
99f8e6cef5
[Bug Fix] Fix for NPCs having spells interrupted. (#3150) 2023-03-27 16:57:08 -04:00
Aeadoin
b6917ec782
[Release] 22.8.0 (#3148) v22.8.0 2023-03-25 20:48:43 -04:00
Aeadoin
eb51550109
[Cleanup] Cleanup Strings::ToInt uses. (#3142)
* [Cleanup] Cleanup Strings::ToInt uses.

* fix for conversion

* remove != 0

* cleanup
2023-03-25 20:32:30 -04:00
Alex King
9d1ace627c
[Feature] Add support for -1 extradmgskill to allow all skills to be scaled. (#3136)
* [Feature] Add support for -1 extradmgskill to allow all skills to be scaled.

- `$mob->GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.

- `statbonuses:GetSkillDamageAmount(skill_id)` now uses `-1` properly.
- `mob:GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.

- A `-1` value in `extradmgskill` denotes the ability to scale all skills at once.
- Consolidated `AddItemBonuses()`, `AdditiveWornBonuses()`, `CalcItemBonuses()`, and `CalcRecommendedLevelBonus()` to mob-based methods to avoid code duplication.
- Bots, NPCs, and Mercs can now use additive worn effects if the rule is enabled, as well as all other proper stat bonuses that only clients had before.
- No SQL update required to change `extradmgskill` and `extradmgamt` to `int` as they already are this type in the database, just had to adjust `item_data.h` and `shareddb.cpp`.

* Update mob.cpp

* Cleanup.

* Cleanup.

* Move #include <vector> to header.

* Add method for GetExtraDamageSkills

* fix additembonuses

* Update bonuses.cpp

* Update mob.cpp

* Out of bounds.

* Update bonuses.cpp

---------

Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
2023-03-25 20:26:01 -04:00
Aeadoin
ec3ef411a1
[Fix] Fix for SQL Query in npc_scale_global_base (#3144) 2023-03-25 20:08:40 -04:00
Aeadoin
1394b6a4d2
[Hotfix] Fix for Items looted from corpses. (#3147) 2023-03-25 20:00:31 -04:00
Aeadoin
7f41547963
[Crash] Fix for crash in Raid::QueuePacket (#3145)
* [Crash] Fix for crash in Raid::QueuePacket

* bots can't be a part of BalanceMana

* corrected additions

* adding additional is_bot gates

* updating raid for loops to be range based.

* typo

* formatting

* formatting
2023-03-25 18:02:05 -04:00
Alex King
2e4071cdcf
[Cleanup] Remove extern bool Critical (#3146)
# Notes
- This is unused.
2023-03-25 17:48:40 -04:00
Aeadoin
dc475a1bd7
[Release] 22.7.0 (#3143) v22.7.0 2023-03-24 15:11:42 -05:00
Aeadoin
59ad91a140
[Feature] Add Data Bucket support for scaling of Heroic Stats. (#3058)
* [Feature] Add Data Bucket support for scaling of Heroic Stats.

* update

* fixes, still reworking logic

* fixes, still reworking logic

* logic done

* logic done

* fixes

* Cleanup

* Cleanup

* Cleanup naming, verify behaviors

* formatting

* formatting

* fix issue with endurance and mana.

* update rule desc

* cleanup

* DataBucket Struct

* Cleanup data_bucket.cpp and add constants

* cleanup

* changes

* formatting

* fix from merge

* escape keyword `key`

* Add `key` to generator, run repository-generator.pl

* fix for change to key

* cleanup

* formatting

* formatting

* typo
2023-03-23 21:42:13 -04:00
Aeadoin
abc27ab423
[Bug Fix] Fix edge cases where camped bots would be left in a raid (#3139)
* [Bug Fix] Fix edge cases where camped bots would be left in a raid

* formatting
2023-03-23 19:23:34 -04:00
Aeadoin
c975dc2412
[Bug Fix] Fix for transferring Raid Leader (#3140) 2023-03-23 19:04:59 -04:00
Aeadoin
e085f271f5
[Bug Fix] Fix for incorrect bindpoint x,y,z,headings (#3141) 2023-03-23 18:55:56 -04:00
Alex
5a6314e1a9
[Fix] Fixes for corpses not properly saving some item instance data correctly. (#3123)
* Convert ZoneDb::LoadCharacterCorpseData to use a cleaner api that has a better layout.

* Update corpse save methods to use a new cleaner api.

* Add item to corpse will use a few new fields that don't yet save.

* Fix for some issues moving data to corpses.

* Make CreateItem more explicit to avoid overlooking places it's used and add more arguments.

* DB changes

* Revert of the changes to the database.CreateItem api change.

* Missed one.

* Fixes for mr Krab

* Small formatting

---------

Co-authored-by: KimLS <KimLS@peqtgc.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-23 01:16:52 -05:00
Aeadoin
dc45e0d280
[Fix] Change SPA 193 Weapon Damage to allow values over 65,535 (#3138) 2023-03-23 01:06:51 -05:00
Aeadoin
2e2c4d64fe
[Cleanup] Cleanup uses of Strings::ToInt to match correct type. (#3054)
* [Cleanup] Cleanup uses of Strings::ToInt to match correct type.

* cleanup
2023-03-22 12:22:03 -04:00
Aeadoin
c5add503ab
[Bug Fix] Fix for Raid Disband if leader not in same zone. (#3135) 2023-03-21 19:16:01 -04:00
Aeadoin
fe2dcb6544
[Crash] Fix dangling Group member pointers for Bots. (#3134)
* [Crash] Fix dangling Group member pointers for Bots.

* fixes for edge cases
2023-03-21 11:57:04 -04:00
Alex King
4fe44f4cb6
[Quest API] Add Timer related methods to Mobs in Perl/Lua (#3133)
* [Quest API] Add Timer related methods to Mobs in Perl/Lua

# Perl
- Add `quest::ispausedtimer(timer_name)`.
- Add `quest::pausetimer(timer_name)`.
- Add `quest::resumetimer(timer_name)`.
- Add `$mob->GetRemainingTimeMS(timer_name)`.
- Add `$mob->GetTimerDurationMS(timer_name)`.
- Add `$mob->HasTimer(timer_name)`.
- Add `$mob->IsPausedTimer(timer_name)`.
- Add `$mob->PauseTimer(timer_name)`.
- Add `$mob->ResumeTimer(timer_name)`.
- Add `$mob->SetTimer(timer_name)`.
- Add `$mob->SetTimerMS(timer_name)`.
- Add `$mob->StopTimer(timer_name)`.

# Lua
- Add `mob:GetRemainingTimeMS(timer_name)`.
- Add `mob:GetTimerDurationMS(timer_name)`.
- Add `mob:HasTimer(timer_name)`.
- Add `mob:IsPausedTimer(timer_name)`.
- Add `mob:PauseTimer(timer_name)`.
- Add `mob:ResumeTimer(timer_name)`.
- Add `mob:SetTimer(timer_name)`.
- Add `mob:SetTimerMS(timer_name)`.
- Add `mob:StopTimer(timer_name)`.

# Notes
- The mob-based methods allow operators to loop entity list or whatever to set, stop, resume, pause, etc for timers.

* StopAllTimers()

* Update questmgr.cpp
2023-03-20 16:18:51 -04:00
Alex King
63a8d2d641
[Cleanup] Delete zone_numbers.h (#3129)
* [Cleanup] Delete zone_numbers.h

# Notes
- This is unused.

* Update client_packet.cpp

* Update client_packet.cpp
2023-03-20 12:06:40 -04:00
Alex King
abcb5d069f
[Cleanup] Remove FindPatch() from struct_category.cpp and struct_category.h (#3130)
# Notes
- This is unused.
2023-03-20 12:06:10 -04:00
Aeadoin
d6b954a4b9
[Cleanup] Cleaning up Raid.cpp (#3125)
* [Cleanup] Cleanup Raid.cpp

* cleanup

* fix is_bot instances

* bracket cleanup

* bracket cleanup

* rename variables in struct

* fix for merge
2023-03-20 11:39:14 -04:00
Alex King
2415645b86
[Fix] Fix typo for bot_id raid_members column in db_update_manifest.txt (#3132)
# Notes
- This was causing this query to run over and over.
2023-03-19 22:32:35 -04:00
Aeadoin
e77a83f8c3
[Rule] Add Rule to allow ExtraDmgSkill/SPA 220 to effect Spell Skills (#3124)
* [Rule] Add Rule to allow ExtraDmgSkill/SPA 220 to effect Spell Skills

* add support for rule "ItemExtraSkillDamageCalcAsPercent"
2023-03-19 12:16:32 -04:00
Alex King
a5d564a6fb
[Cleanup] Remove ChangeHP() from mob.h (#3128)
# Notes
- This is unused.
2023-03-19 10:18:31 -04:00
Alex King
2f4c91824e
[Feature] Add Item Extra Skill Damage Percent Modifier (#3127)
* [Feature] Add Item Extra Skill Damage Percent Modifier

# Notes
- Allows `Character:ItemExtraDmgCap` to be disabled if set to `-1` or lower.
- Allows operators to set `Character:ItemExtraSkillDamageCalcAsPercent` to `true` to allow skill damage for Frenzy, Backstab, Bash, Slam, Kick, and all Monk attacks to scale with a percentage based on `extradmgamt` values from items and spells.

* > 0
2023-03-19 09:59:13 -04:00
Aeadoin
53e6f931c9
[Crash] Fixes Crash when Zoning with XTarget when Bots are in group. (#3126) 2023-03-19 08:26:16 -04:00
Alex King
a6efb1e8b5
[Cleanup] Remove GetStartCount() and InitStartTimer() from zone_launch.cpp and zone_launch.h (#3121)
# Notes
- These are unused.
2023-03-17 19:21:50 -04:00
Alex King
b2757143a8
[Cleanup] Remove SetConnection() from loginserver/world_server.h (#3120)
# Notes
- This is unused.
2023-03-17 19:21:44 -04:00
Alex King
6e5da0e558
[Cleanup] Remove GetServerByAddress() from server_manager.h (#3119)
# Notes
- This is unused.
2023-03-17 19:21:38 -04:00
Alex King
6b8e74a29f
[Cleanup] Remove PlayerLogin_Struct from login_types.h (#3118)
# Notes
- This is unused.
2023-03-17 19:21:30 -04:00
Alex King
203e63101a
[Cleanup] Remove IsConnected() from loginserver/database.h (#3117)
# Notes
- This is unused.
2023-03-17 19:21:18 -04:00
Alex King
91257d599b
[Cleanup] Remove unused methods in loginserver/client.h (#3116)
* [Cleanup] Remove LoginOnNewConnection(), LoginOnPacketRecv(), and LoginOnStatusChange() from loginserver/client.h

# Notes
- These are unused.

* Cleanup.
2023-03-17 19:21:08 -04:00
Alex King
491b358e28
[Cleanup] Remove UpdateLoginserverWorldAdminAccountPasswordById() from account_management.cpp (#3115)
# Notes
- This is unused.
2023-03-17 19:20:56 -04:00
Alex King
180c3088ca
[Cleanup] Remove DBInitVars() and HandleMysqlError() from queryserv/database.h (#3114)
# Notes
- These are unused.
2023-03-17 19:20:47 -04:00
Alex King
97e4547192
[Cleanup] Remove DBInitVars(), HandleMysqlError(), and IsChatChannelInDB() in ucs/database.h (#3113)
# Notes
- These are unused.
2023-03-17 19:20:41 -04:00
Aeadoin
0caee9026a
[Rule] Add Task System Rule ExpRewardsIgnoreLevelBasedEXPMods (#3112)
* [Rule] Add Task System Rule ExpRewardsIgnoreLevelBasedEXPMods

* description
2023-03-17 19:15:02 -04:00
Aeadoin
0be7ead1d1
[Bug Fix] Fix Bard Bot Casting (#3122) 2023-03-17 19:07:54 -04:00
Aeadoin
950489bc34
[Bug Fix] Fix Raid methods that could cause crashes with Bots in raid (#3111) 2023-03-17 16:19:29 -04:00
Mitch Freeman
45da8cab61
[Bots] Add Basic Bot Raiding Functionality (#2782)
* Fix for GENERIC_9_STRINGS

* Add Bot Heal Message Display

Creates a new rule to display Bot heal messages to the Bot Owner

* 2021-03-25 11L04pm

Spell and Heal Rule added to allow for Bot spell and heal damage to be sent to the Bot Owner's Group.  Also added a check to remove duplicate message for #damage on self.

* Update .gitignore

* BOT work

Added BOT logging damage/heals to owner
Added BOT message to owner for harmony fails
Made var Critical global to remove duplicate crit messages
Added a NULL check to Mob:GetCleanname()

* Bot Group Work

Fixed botid=charid spawn on zone issue
Added a group_list update on zone to refresh from database to fix a dangling pointer to a Bot object that was camped but was previously in a group within the zone being entered.
Modified Bot::ProcessBotGroupInvite to use the client of the bot when doing the Bot initialization so that a leader can invite another owner's Bot

* Jan 4

Basic structure in place for Raid::AddBot though not working

* Basement Jan 5

* End of day Jan 5
Working Raid Invite to a Bot.

* Update to Client::QueuePacket to not attempt to send a packet to a BoT.  Not clean, but a broad solution.

* Updated Raid::VerifyRaid

* Some Bot Raid working

* Before VS Crash

* Use Case 1, 2, 3,4,7 working.
Need to fix 5, 6, 8

* Work on usecase 5

* A few more use cases working

* New work on Raid invite with a invitor having a group

* Bot Raid inviting working for all use cases

* A few changes

* end of day jan 10

* Jan 11

* end of day Jan 11

* Bot Invite/Accept cleanup

* Start of moving raid bot functions to their own methods

* More bot raid changes

* More raid spell work

* end of day Jan 16

* spawn work

* Spawn on login working

* End of Day Jan 18

* Raid leader and mana/hp updates fixed

* Spell Tracking

* Issue with Bot Death in raid when casted upon.  1741 raid.cpp

* Bot Death fixed and few other crashes

* Working on botgroup removal

* Bot Disbanding Work 90%

* Looks like BOTs are working

* Fixed a bot crash

* bug tracing on entity list mismatch

* safe_delete resoves problem.  No to track down leak

* seems to be working

* Memory corruption found - sending packets to BoTs using Client class

* added Raid::IsRaidMemberBot()

* Update p_raid_instance

* g3

* Final - Bot Raid Working

* Fixed IsRaidMemberBot to remove memory leak
Fixed altcombat crash though RaidMainAssist (428) needs fixing

* add RaidMember.IsBot

* Repaired IsBot function to be more preformant.  Now works on standard performance machine

* Fixed Bard AE Target Spells
Removed assert for buffs

* updated based on Feb 2022 master updates

* Added bot_db_updates and version increment

* Cleanup of bot raid work and inclusion of bot_raid in cmake

* Delete .gitignore

* Revert "Delete .gitignore"

This reverts commit 8523658d3bacdc068bcafaa652d2100afecddfc2.

* Fixed a packet issue

* Merged upstream/master

Merged upstream/master and removed ifdef BOTS as per recent dev approach for BOTS.  Functionality is there, compiles and tests ok.  A few problems to be resolved though this is a good baseline.

* Added sql update for raid_members to add isbot

* Updated Bot Follow Function

Bot will now follow the Group Leader if IsClient, otherwise follows the Bot Owner

* Updates to Bot Raid System

When camping a client, remove them from the raid.  If they are leader, place leadership to the next client.
Update a few crash checks in bot_raid.cpp

* [BOTS] Added RuleB Enabled checks and updated base repo for raid_members

Updated several RuleB(Bots, Enabled) checks
Updated the base repo to be autogenerated.
Raid functionality should work with a non-bots enabled database.

* Few quick updates

* Updates

Corrected a number of comments.  Compiled and tested against bot and non-bot database though requires the isbot column in raid_members for both.
Moved the db update out of the bot stream to make bot check code easier.

* Formatting and other small updates

* A few more RuleB(Bots, Enabled) additions

* Fix issue with conflict of bot ID versus character ID.

* Delete CMakeSettings.json

* Comment Updates and other

Several updates including
- fixed comments from PR
- added id to raid_members and unique index on name to avoid botid and charid conflicts
- updated a few raid functions for iterators
- reordered several raid operations to ensure send leader packet to be the last item to ensure proper updating on the client
- update sql to use Replace instead of Insert for botid conflicting with charid

* Exploit fix for Raid Bots

Added item from @Nite to disallow spawning or camping bots if Raid is engaged.  Avoids abusive situations.

* Initial Commit

* fix Raid Window after zoning

The raid window was not fully updating for clients not in the zone.

* Cleanup

* Update

Fixed comments

* Resolve crash for MOTD

Fixed a crash situation sending a raid MOTD to BOTS.

* Update ruletypes.h

* Updated to resolve a few recent comments

Fixed some comments within attack.cpp

* fix sql query

* update repository

* prevent duplicate entries in raid after group invite, and cleanup

* fixes for botgroups not following, and add already in raid messages.

* fix messagestring

* fixes

* Cleanup, and resolving issues with disbanding

* refactoring

* more cleanup/fixing.

* fixes for removing from ground in raid

* Refactoring/fixing multiple clients

* fix for compiling

* Bugs from refactoring fixed

* Testing completed, cleaning up unwanted items/duplicate code.

* Cleaned up AICastSpell

* fix typos

* Refactoring

* Adding Raid checks to AI_Process/cleanup

* Fix a typo

Was getting a SQL error on BOT spawn.  Fixed typo.

* fix for crash

* Fixed crash when inviting player, more refactoring

* AI_Process Refactoring work

* More Refactoring/fixes for follow

* Finish Refactoring AI_Process

* cleanup

* cleanup

* cleanup

* cleanup

* fix melee attack loop

* fix for leashowner.

* fix for leashowner.

* Bots persist in raid after client death/LD/Camp

* Fix Bot Groups when zoning after death.

* Fix Bots in group following after client death

* remove unnecessary query

* Allow Raid members to invite Bots if owner is in raid. cleanup

* optimization of raid verification

* remove this

* Code Cleanup

* formatting

* formatting

* formatting

* fix for macro

* add return for TryClassAttacks

* fix query

* fix for crash

* restrict camping/spawn in combat.

* Fix other crash issue.

* update learnmembers to use Strings::To, cleanup magic numbers

* fix for merge.

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
2023-03-17 11:19:59 -04:00
Alex King
e778041198
[Cleanup] Remove ownHiddenTrigger from trap.cpp and trap.h (#3092)
# Notes
- This is unsued.
2023-03-17 08:37:36 -04:00
Alex King
97e50ced93
[Cleanup] Delete deprecated/perlxs folder (#3110)
# Notes
- This entire folder is unused.
2023-03-17 06:23:30 -04:00
Alex King
4491bb9a70
[Cleanup] Remove is_authenticatd, LSShutDownUpdate(), and SetInstanceID() from zoneserver.h (#3109)
# Notes
- These are unsued.
2023-03-17 06:23:19 -04:00
Alex King
04fba27467
[Cleanup] Remove StoreCharacter() from worlddb.h (#3108)
# Notes
- This is unused.
2023-03-17 06:23:10 -04:00
Alex King
fa47dd7f93
[Cleanup] Remove DisableStats(), EnableStats(), DisableLoginserver(), and EnableLoginserver() from world_config.h (#3107)
# Notes
- These are unused.
2023-03-17 06:23:01 -04:00
Alex King
b3fb5f00ab
[Cleanup] Remove MakeGuildMembers() from wguild_mgr.h (#3106)
# Notes
- This is unused.
2023-03-17 06:22:51 -04:00
Alex King
e17fad9ae0
[Cleanup] Cleanup unused methods and variables in world/main.cpp and world/main.h (#3105)
# Notes
- These are unused.
2023-03-17 06:22:41 -04:00
Alex King
bbdaacd3b0
[Cleanup] Remove AllConnected(), CanUpdate(), and SendInfo() from login_server_list.cpp and login_server_list.h (#3104)
# Notes
- These are unused.
2023-03-17 06:22:34 -04:00
Alex King
61bd485449
[Cleanup] Remove unused methods in eql_config.cpp, eql_config.h, launcher_list.cpp, and launcher_list.h (#3103)
# Notes
- These are unused.
2023-03-17 06:22:01 -04:00