Commit Graph

8162 Commits

Author SHA1 Message Date
Kinglykrab 2f962c2c8a [Commands] Cleanup #refreshgroup Command. (#2119)
- Cleanup messages and logic.
2022-05-06 20:42:25 -04:00
Kinglykrab 6bbd1e94c3 [Commands] Cleanup #push Command. (#2114)
- Cleanup messages and logic.
2022-05-06 19:38:15 -05:00
Kinglykrab 78d44440eb [Commands] Cleanup #qglobal Command. (#2115)
- Cleanup messages and logic.
2022-05-06 19:37:45 -05:00
Kinglykrab 1e45ffa24d [Bug Fix] Resolve subroutine redefinition due to bot methods. (#2117)
* [Bug Fix] Resolve subroutine definition due to bot methods.

* Update perl_bot.cpp
2022-05-06 19:33:20 -05:00
Kinglykrab 37d5d96871 [Commands] Cleanup #resetaa_timer Command. (#2131)
* [Commands] Cleanup #resetaa_timer Command.
- Cleanup messages and logic.

* Typos.
2022-05-06 20:26:59 -04:00
Kinglykrab 90725f9fd9 [Commands] Cleanup #revoke Command. (#2134)
* [Commands] Cleanup #revoke Command.
- Cleanup messages and logic.

* Update revoke.cpp
2022-05-06 20:26:54 -04:00
Kinglykrab c1aa3e7056 [Commands] Cleanup #reloadallrules Command. (#2121)
* [Commands] Cleanup #reloadallrules Command.
- Cleanup messages.

* Typo.
2022-05-06 20:26:39 -04:00
Kinglykrab 1d59fff2bf [Commands] Cleanup #reloadperlexportsettings Command. (#2124)
* [Commands] Cleanup #reloadperlexportsettings Command.
- Cleanup messages and logic.
- Make reloading of Perl event export settings global instead of zone specific.

* Update worldserver.cpp
2022-05-06 20:22:58 -04:00
Kinglykrab 6beb220e93 [Commands] Cleanup #reloadtitles Command. (#2125)
* [Commands] Cleanup #reloadtitles Command.
- Cleanup messages;

* Update worldserver.cpp
2022-05-06 20:20:42 -04:00
Kinglykrab 3091a84540 [Commands] Cleanup #reloadworld and #repop Command. (#2127)
* [Commands] Cleanup #reloadworld Command.
- Cleanup messages and logic.

* [Commands] Cleanup #reloadworld and #repop Command.
- Cleanup messages and logic.
- Add #reloadworld 2 option to forcefully repop all mobs globally as well as reset quest timers and reload quests.
- Remove delay argument from #repop as it isn't used for anything.

* Typos.
2022-05-06 20:06:51 -04:00
Kinglykrab 9fbab76d40 [Commands] Cleanup #summonburiedplayercorpse Command. (#2146)
* [Commands] Cleanup #summonburiedplayercorpse Command.
- Cleanup messages and logic.

* Update summonburiedplayercorpse.cpp
2022-05-06 20:06:04 -04:00
Kinglykrab b03d47b9cd [Commands] Cleanup #trapinfo Command. (#2148)
* [Commands] Cleanup #trapinfo Command.
- Cleanup messages.
- Does not modify the command file, as it's only one line that calls the method in zones/trap.cpp.

* Cleanup.

* Update trap.cpp

* Update trap.cpp
2022-05-06 20:05:55 -04:00
Kinglykrab b583d95f09 [Commands] Cleanup #reloadrulesworld Command. (#2128)
- Cleanup messages and logic.
2022-05-06 20:05:40 -04:00
Kinglykrab 6846deb9c8 [Commands] Cleanup #reloadstatic Command. (#2130)
- Cleanup messages and logic.
- Make reloading of static zone data global instead of zone specific.
2022-05-06 20:03:22 -04:00
Kinglykrab adfec15893 [Commands] Cleanup #resetaa Command. (#2132)
* [Commands] Cleanup #resetaa Command.
- Cleanup messages and logic.

* Update resetaa.cpp
2022-05-06 20:02:32 -04:00
Kinglykrab 132c936c90 [Commands] Cleanup #sensetrap Command. (#2137)
* [Commands] Cleanup #sensetrap Command.
- Cleanup messages and logic.

* Update sensetrap.cpp
2022-05-06 20:01:29 -04:00
Kinglykrab a0ed0d57c5 [Commands] Cleanup #serverinfo Command. (#2138)
* [Commands] Cleanup #serverinfo Command.
- Cleanup message and logic.
- Use popup instead of messages.

* Update serverinfo.cpp
2022-05-06 20:01:21 -04:00
Kinglykrab 128e8ce08d [Commands] Cleanup #resetdisc_timer Command. (#2133)
- Cleanup messages and logic.
2022-05-06 19:50:58 -04:00
Kinglykrab 55629ce396 [Commands] Cleanup #roambox Command. (#2135)
- Cleanup messages and logic.
2022-05-06 19:50:26 -04:00
Kinglykrab bf7c1252f8 [Commands] Cleanup #save Command. (#2136)
- Cleanup messages and logic.
2022-05-06 19:50:19 -04:00
Kinglykrab e2bfa44df0 [Commands] Cleanup #serverrules Command. (#2139)
- Cleanup messages and logic.
- Change separator from new line to pipe separator, as new line was non-functional.
2022-05-06 19:50:09 -04:00
Kinglykrab e5acc7c322 [Commands] Cleanup #shownpcgloballoot and #showzonegloballoot Command. (#2141)
- Cleanup messages and logic.
2022-05-06 19:50:03 -04:00
Kinglykrab 5aaaaed6f1 [Commands] Add #feature Command. (#2142)
* [Commands] Add #feature Command.
- Removes #beard, #beardcolor, #details, #face, #hair, #haircolor, #helm, #heritage, #size, and #tattoo commands.
- Cleanup messages and logic.
- Consolidate 13 different feature settings to this one command.
- Unique commands including #gender, #race, and #texture were not removed.

* Add missing feature.cpp.

* Update feature.cpp
2022-05-06 19:49:56 -04:00
Kinglykrab 6d31786456 [Commands] Cleanup #spawnfix Command. (#2143)
- Cleanup messages and logic.
2022-05-06 19:49:51 -04:00
Kinglykrab 0aeab11408 [Commands] Cleanup #summon Command. (#2145)
* [Commands] Cleanup #summon Command.
- Cleanup messages and logic.
- Add glm::vec4 overload for GMMove.
- Remove unused parameter from GMMove.
- Remove unnecessary Lua GMMove now that parameter is gone.

* Update summon.cpp

* Cleanup.
2022-05-06 18:45:12 -05:00
Kinglykrab fc484d0b1c [Commands] Cleanup #gassign Command. (#2101)
* [Commands] Cleanup #gassign Command.
- Cleanup messages and logic.

* Update gassign.cpp

* Update gassign.cpp
2022-05-06 19:13:28 -04:00
Kinglykrab 8dcc810b43 [Commands] Cleanup #spawnstatus Command. (#2144)
* [Commands] Cleanup #spawnstatus Command.
- Cleanup messages and logic.

* Further cleanup and consolidation, add inline GetTimer() as timer is protected.
2022-05-06 18:12:29 -05:00
Kinglykrab 04f3d6286c [Commands] Cleanup #attack Command. (#2103)
- Cleanup messages and logic.
2022-05-03 23:05:16 -04:00
Kinglykrab 35044becc1 [Commands] Cleanup #freeze and #unfreeze Commands. (#2102)
- Cleanup messages and logic.
- Remove the ability to #freeze yourself.
2022-05-03 23:05:09 -04:00
Kinglykrab e08afb1234 [Commands] Cleanup #getvariable Command. (#2100)
- Cleanup messages and logic.
2022-05-03 23:05:02 -04:00
Kinglykrab b2b87ea4e0 [Quest API] Expand Bot quest API functionality. (#2096)
* [Quest API] Expand Bot quest API functionality.
- Add $bot->AddItem(slot_id, item_id, charges, attuned, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six) to Perl.
- Add $bot->CountItem(item_id) to Perl.
- Add $bot->HasItem(item_id) to Perl.
- Add $bot->RemoveItem(item_id) to Perl.
- Add bot:AddItem(slot_id, item_id, charges, attuned, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six) to Lua.
- Add bot:CountItem(item_id) to Lua.
- Add bot:GetOwner() to Lua.
- Add bot:HasItem(item_id) to Lua.
- Add bot:RemoveItem(item_id) to Lua.

* Fix possible crash.
2022-05-03 23:04:54 -04:00
Kinglykrab 837c0a4385 [Quest API] Perl Money Fixes. (#2098)
- Fixes `$client->GetAllMoney()` to use `uint64` and not overflow int value.
- Fixes `$client->GetCarriedMoney()` to use `uint64` and not overflow int value.
2022-05-03 22:55:56 -04:00
Kinglykrab 9b075c28b6 [Quest API] Add commify to Perl/Lua. (#2099)
- Add quest::commify(number) to Perl.
- Add eq.commify(number) to Lua.
2022-05-03 19:44:22 -04:00
Paul Coene c4f05c3864 [Combat] Fix Frenzy vs opponents immune to non-magic (#2095)
* [Combat] Fix Frenzy vs opponents immune to non-magic

* Fix naming.

* Use snake case for variable
2022-05-02 23:08:08 -04:00
hg dc004c2a9d Remove already defined method (#2093)
CastRestrictedSpell is already defined in common/spdat

MSVC Debug builds caught this as an ODR violation, though Release
builds still allowed it (maybe because the methods were identical)
2022-05-01 20:54:50 -04:00
Kinglykrab d59dcb68ca [Commands] Add additional #peqzone functionality. (#2085)
* [Commands] Add additional #peqzone functionality.
- Add #peqzone flagging capabilities so operators don't have to blanket allow #peqzone access to zones.
- Allows you to set a zone's `peqzone` column to `2` and disallow use of `#peqzone` until they have been given the appropriate flag.
- Add #peqzone_flags command to list your #peqzone flags similar to #flags command.
- Add `character_peqzone_flags` table to database and database_schema.h.
- Required SQL update to add the new table.
- Add client:ClearPEQZoneFlag(zone_id) to Lua.
- Add client:HasPEQZoneFlag(zone_id) to Lua.
- Add client:LoadPEQZoneFlags() to Lua.
- Add client:LoadZoneFlags() to Lua.
- Add client:SendPEQZoneFlagInfo(client) to Lua.
- Add client:SetPEQZoneFlag(zone_id) to Lua.
- Add $client->ClearPEQZoneFlag(zone_id) to Perl.
- Add $client->HasPEQZoneFlag(zone_id) to Perl.
- Add $client->LoadPEQZoneFlags() to Perl.
- Add $client->SendPEQZoneFlagInfo(client) to Perl.
- Add $client->SetPEQZoneFlag(zone_id) to Perl.

* Fixes.
2022-05-01 19:39:52 -04:00
Chris Miles c7dbdfae58 [Combat] Basic Combat Recording (#2090)
* Basic combat recording

* Update combat_record.h
2022-05-01 18:08:12 -05:00
Kinglykrab 759f9bd007 [Bots] Bot::PerformTradeWithClient Cleanup. (#2084)
* [Bots] Bot::PerformTradeWithClient Cleanup.
- Cleanups message and logic.
- Initial cleanup to eventually allow easy use with Perl/Lua quest API.

* Duplicated comment.
2022-05-01 19:05:12 -04:00
Chris Miles 8f0b80097e [Refactor] Simplify NPC Loading (#2087)
* Refactor / simplify NPC loading

* Update spacing [skip ci]

* Update base_npc_types_repository.h
2022-05-01 17:04:38 -05:00
Chris Miles 71ae03d5bc [Compile] Decrease build times using unity build strategy (#2089) 2022-05-01 15:53:21 -05:00
KayenEQ 34dc081306 [Spells] Update to target types Beam and Cone to ignore invalid targets. (#2080) 2022-05-01 16:50:55 -04:00
Chris Miles 90da136b7a [Regen] Implement Per Second HP Regen for NPCs (#2086)
* Implement NPC per second regen

* Add hp_regen_per_second to ModifyNPCStat

* Take per second regen the rest of the way

* Add #npcedit hp_regen_per_second

* Add db migration
2022-05-01 10:26:16 -04:00
Chris Miles 5b4aeaa457 [Code Cleanup] Remove this-> in code where its implied (#2088) 2022-05-01 10:22:09 -04:00
Kinglykrab b02008ec53 [Bots] Remove unused methods. (#2082)
- Remove Bot::BotTradeSwapItem().
- Remove Bot::ApplySpecialAttackMod().
2022-04-30 18:13:34 -04:00
Kinglykrab c709a6aa8e [Quest API] Add multiple inventory method short hands to client. (#2078)
- Allows you to just directly use Client instead of having to grab reference to inventory.
- Add $client->CountAugmentEquippedByID(item_id) to Perl.
- Add $client->HasAugmentEquippedByID(item_id) to Perl.
- Add $client->CountItemEquippedByID(item_id) to Perl.
- Add $client->HasItemEquippedByID(item_id) to Perl.
- Add client:CountAugmentEquippedByID(item_id) to Lua.
- Add client:HasAugmentEquippedByID(item_id) to Lua
- Add client:CountItemEquippedByID(item_id) to Lua.
- Add client:HasItemEquippedByID(item_id) to Lua.
2022-04-30 11:47:05 -04:00
Kinglykrab 9113508269 [Bots] Fix ^dyearmor command math. (#2081)
* [Bots] Fix ^dyearmor command math.

* Typo.
2022-04-30 10:57:22 -04:00
Kinglykrab 1b7c12297d [Quest API] Add AddPlatinum(), GetCarriedPlatinum() and TakePlatinum() to Perl/Lua. (#2079)
* [Quest API] Add AddPlatinum(), GetCarriedPlatinum() and TakePlatinum() to Perl/Lua.
- Allows for easier NPC interactions.
- GetCarriedPlatinum() adds together all currencies in inventory based on conversion amounts so it works easily with removals/checks.
- Add $client->AddPlatinum(platinum, update_client) to Perl.
- Add $client->GetCarriedPlatinum() to Perl.
- Add $client->TakePlatinum(platinum, update_client) to Perl.
- Add client:AddPlatinum(platinum, update_client) to Lua.
- Add client:GetCarriedPlatinum() to Lua.
- Add client:TakePlatinum(platinum, update_client) to Lua.

* Formatting.
2022-04-30 10:57:05 -04:00
nytmyr b1311780a7 [Quest API] Add EVENT_SKILL_UP & EVENT_LANGUAGE_SKILL_UP to Perl/Lua (#2076)
Added EVENT_SKILL_UP to Perl/Lua

Adds sub EVENT_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill
$is_tradeskill - 0 for non-tradeskill, 1 for tradeskill

Example usage:
sub EVENT_SKILL_UP {
if($is_tradeskill == 0) {
		quest::shout("Skill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
	}
	if ($is_tradeskill == 1) {
		quest::shout("Tradeskill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
	}
}

Adds sub EVENT_LANGUAGE_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill

Example usage:
sub EVENT_LANGUAGE_SKILL_UP  {
		quest::shout("Language Increase! " . $client->GetCleanName() . " has increased their " . quest::getlanguagename($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}

Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
2022-04-25 11:18:52 -05:00
cybernine186 0d734a0837 Bug Fix for WorldServer::HandleMessage, CZUpdateType_NPC (#2074) 2022-04-21 08:17:29 -04:00
Paul Coene ee54a7eb5f [Bug Fix] Restore missing messages for lifetap and dmg spells. (#2057)
* [Bug Fix] Restore missing messages for lifetap and dmg spells.

* Fix unintended duplicate message for DD on clients.

* Improve performance and accuracy of IsDamageSpell()
2022-04-13 23:11:26 -04:00