324 Commits

Author SHA1 Message Date
Chris Miles
5b4aeaa457
[Code Cleanup] Remove this-> in code where its implied (#2088) 2022-05-01 10:22:09 -04:00
KayenEQ
4296e2e39e
[API] GetNPCStat default better naming (#2053) 2022-03-12 20:01:25 -05:00
KayenEQ
8107ed52e1
[API] GetNPCStat can now return default stat values. (#2048)
* [API] GetNPCStat return default stat values.

* [API] GetNPCStat can now return default stat values.
2022-03-11 09:10:52 -05:00
KayenEQ
1c0524681e
[API] perl added GetNPCStat(identifier) (#2012)
* [API] perl added GetNPCStat

Returns values of the modifiers from ModifyNPCStat

* https://github.com/EQEmu/Server/pull/2012
2022-02-20 14:00:28 -05:00
Kinglykrab
0400504adc
[Bug Fix] NPC::CountItem and Corpse::CountItem 0 Charge Item Fix. (#1959)
- Fixes an issue where 0 charged or out of charge items do not count towards the return value.
2022-02-04 06:07:46 -05:00
KayenEQ
71c53cb18b
[Spells] Updates and fixes to Target Locked Pets (#1932)
* start of rework

* reworked v2 no timer

* fix

* more mechanics

* Update pets.cpp

* move to pet.cpp

* [Spells] Updates and fixes to Target Locked Pets

* [Spells] Updates and fixes to Target Locked Pets
2022-01-18 21:48:36 -05:00
KayenEQ
5ebbbf647b
[Spells] SPA 299 Wake the Dead updates and crash fixes. SPA 306 Army of Dead implemented. (#1929)
* start

* wtd fix v1

* Update aa.cpp

* rework done, army of dead supported

* debugs

* Update aa.cpp

* Update spdat.h
2022-01-16 14:55:51 -05:00
Kinglykrab
e474b2a280
[Commands] Add #petitems Command. (#1823)
- Add #petitems command to show a person's pet items if they have access to the command.
- Adds a default false parameter to QueryLoot for NPCs that keeps messages and logic from being ran on pets for no reason.
- Cleaned up message a bit for loot and stuff.
- Remove check for loottable ID when using #npcstats for NPCs that get items from a script or otherwise.
2021-11-25 14:50:05 -05:00
Kinglykrab
5470ec6293
[Commands] Cleanup #corpse Command. (#1790)
- Cleanup message and logic.
- Add ConvertMoneyToString(platinum, gold, silver, copper) helper method.
- Cleanup NPC::QueryLoot() and Corpse::QueryLoot().
2021-11-21 14:02:03 -05:00
Kinglykrab
b9214bfdee
[Commands] Cleanup #aggro Command. (#1799)
- Cleanup messages and logic.
- Cleanup constant names and references.
- Cleanup aggro description methods.
2021-11-21 10:12:12 -05:00
Kinglykrab
5d75b7b365
[Commands] Cleanup #advnpcspawn and #npcspawn Commands. (#1754)
* [Commands] Cleanup #advnpcspawn and #npcspawn Commands.
- Cleanup messages and logic.
- Add enum for spawn types to remove magic numbers.
- Cleanup messages that were improper/unused.

* Cleanup.

* Cleanup.

* Cleanup.

* Typo.

* Update command.cpp
2021-11-14 19:58:55 -06:00
Kinglykrab
194c71727d
[Commands] Cleanup #npcstats Command. (#1690)
- Cleanup menu and add stats that were not there before.
- Only display some data if necessary (i.e only show loot/money if they have loot/money)
- Add skill name helper method.
- Add faction name helper method.
- Add Charmed stats and other getter methods.
- Cleanup QueryLoot() method.
2021-11-07 17:20:43 -05:00
Kinglykrab
17aaab1f9d
[Quest API] Add Spell methods to Perl. (#1631)
* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
2021-11-03 17:47:15 -04:00
KayenEQ
060be606e7
[Spells] Rework of Virus Effect code (#1593)
* start of rework

* functional

* virus updates

* Update npc.cpp

* updates

* updates

* update v2

* pre remove old code

* removed old code1

* remove debugs

* description

* Update spell_effects.cpp

* changed function name

* remove unused var

* merge error fix

* fix formating issue

* Update spdat.cpp

* Update spell_effects.cpp

* Convert virus entity range code to use vectors and GetCloseMobList

* Formatting [skip ci]

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-10-24 18:27:51 -05:00
Noudess
740f84dc22 always_aggro flag needed to be checked on assist 2021-10-05 15:51:22 -04:00
Kinglykrab
56b9b6f2c4
[Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua. (#1529)
* [Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua.
- Add $corpse->GetLootList() to Perl.
- Add $npc->GetLootList() to Perl.
- Add corpse:GetLootList() to Lua.
- Add npc:GetLootList() to Lua.

Returns an array of item IDs for use with corpse and NPC methods such as HasItem(item_id), CountItem(item_id), and GetFirstSlotByItemID(item_id).

* Categories.

* Modify Lua to use classes.
2021-09-12 22:38:38 -05:00
Chris Miles
94c1a50cc8
[GM Command] Door Manipulation Command Port (#1524)
* Initial commit

* Push latest

* Update door_manipulation.cpp

* More door work

* More doors work

* Upload notes

* Finalize changes

* Remove comment

* Add missing chat line

* Swapped URI parser with something not using deprecated C++ functions
2021-09-12 22:08:04 -05:00
Kinglykrab
26299354b6
[Quest API] Adds new methods to NPCs and Corpses (#1510)
- Add $npc->HasItem(item_id) to Perl.
- Add $npc->CountItem(item_id) to Perl.
- Add $npc->GetItemIDBySlot(loot_slot) to Perl.
- Add $npc->GetFirstSlotByItemID(item_id) to Perl.
- Add $corpse->HasItem(item_id) to Perl.
- Add $corpse->CountItem(item_id) to Perl.
- Add $corpse->GetItemIDBySlot(loot_slot) to Perl.
- Add $corpse->GetFirstSlotByItemID(item_id) to Perl.
- Add npc:HasItem(item_id) to Lua.
- Add npc:CountItem(item_id) to Lua.
- Add npc:GetItemIDBySlot(loot_slot) to Lua.
- Add npc:GetFirstSlotByItemID(item_id) to Lua.
- Add corpse:HasItem(item_id) to Lua.
- Add corpse:CountItem(item_id) to Lua.
- Add corpse:GetItemIDBySlot(loot_slot) to Lua.
- Add corpse:GetFirstSlotByItemID(item_id) to Lua.

These methods will allow server operators to view the loot a current has in a slot, the first slot found by item ID, count the item by ID, and see if the NPC has the item.

With that functionality you could build a custom loot system and modify loot more dynamically.
2021-08-31 00:42:08 -05:00
Alex
3886636ec7
[Commands] Modify #grid and #wp. (#1399)
- #grid add will no longer let you put in a duplicate grid.
- Grid nodes now spawn with invul/immune to damage.
- Grid nodes now set an entity variable "grid_id" on spawn.
- This allows grid nodes to be specifically despawned by "grid_id" entity variable, meaning you can view multiple grids at once and not despawn them all accidentally.
- #grid hide will despawn your targeted NPC's Grid nodes.
- #grid add, #grid show, #grid delete, and #grid hide send messages to let GM know what's going on.
- #wp add and #wp delete now send messages to let the GM know what's going on.
- #wpadd now send messages to let the GM know what's going on.
2021-06-13 21:41:38 -05:00
RoTPvP
71e9dd5a3c
[PVP] Pvp guard assist code. (Guards will assist in PvP based on faction) (#1367)
* Added Guard Assist Code

* Added PvP Rule and Detrimental Spell Check

* Added IsGuard() Method

* Change from uint to bool

* Added a faction check to IsGuard()

* Simplified Guard Checks, reduced costs

* Added IsNPC check to guard check

* simplified pet check

* Removed Magic numbers

* Formatting Fix

* Code fixes

* Fixed constants

Co-authored-by: ProducerZekServer <go@away.com>
2021-05-30 20:22:52 -05:00
Paul Coene
843aac631b
[Bug Fix] Add debugging and fix edge case where no target for aggro mob (#1344)
Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:10:13 -05:00
Paul Coene
c18562b150
[Bug] Fix ignore_primary_assist. (#1323)
* [Bug] Fix ignore_primary_assist.

* Fix to continue loop instead of return

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-22 23:40:17 -05:00
Peter Rigby
324d48aa90
[Fix] Moved assigning of AISpellVar variables before AI_Start() so that any values that override the rule values will not be ignored (#1321) 2021-04-07 01:22:42 -05:00
Michael Cook (mackal)
29cdca380f Fix copy and paste error 2021-03-06 19:58:18 -05:00
Alex
d635e69ee3
Merge pull request #1283 from EQEmu/cleanup/Wformat-overflow
[Cleanup] Make code -Wformat-overflow safe
2021-03-05 19:23:48 -08:00
Michael Cook (mackal)
0b8220be32 Clean up last name handling in NPC::PetOnSpawn
Same as last time
2021-03-05 15:51:59 -05:00
Akkadius
450c748299 Fix database connection pointer bucket consistency 2021-02-28 19:31:46 -06:00
Noudess
d7d9c73e5e Add comment. 2021-02-09 11:32:13 -05:00
Noudess
d90d680e8a More formatting 2021-02-09 11:24:25 -05:00
Noudess
baa53e134a Fixed missing argument - oops 2021-02-09 10:00:17 -05:00
Noudess
3bafc5b3f4 Change modified sneak pull assist range to a rule. Fixed formatting on decls. 2021-02-09 09:50:22 -05:00
Noudess
b2e4e91fbd Very simple implementation of Sneak Pull 2021-02-09 08:31:35 -05:00
Alex
8f89f38f5c
Add ScaleNPC() to Perl and Lua. (#1238) 2021-02-08 23:08:07 -06:00
Chris Miles
694d380e66
[Door Opening] Rule to let configure Animal Door Opening (#1231)
* Add rule configuration for letting animals open doors or not

* Handle one more spot

* Make adjustments and add mob property that serves as a check as to whether a mob entity can open doors or not

* Push attribute to mob window
2021-02-07 19:52:58 -06:00
Chris Miles
ca98ea9872
Merge pull request #1180 from noudess/boat
Allow boats flymode to be overridden by local db
2021-01-21 18:26:05 -06:00
Noudess
eb24e333d7 Allow boats flymode to be overridden by local db 2021-01-11 10:58:08 -05:00
hg
836210404c Fix zone crash on spawn condition change
The NPC pointer held by Spawn2 wasn't reset if the npc was depopped
without a respawn timer by #depop commands or depop(false) quest apis.
If the NPC was part of a spawn condition then the condition would try
to dereference that pointer (which gets deleted) on condition change.
2021-01-08 23:53:06 -05:00
Akkadius
f5817677df Only add self to others when moving 2021-01-03 16:42:34 -06:00
Akkadius
7b9d88b70b Fix a situation where guards don't scan fast enough because they stand idle, moving mobs will add themselves to guards 2021-01-03 16:40:56 -06:00
Chris Miles
80ce499f67
Scanning Optimizations (#1133)
* Scanning optimizations this more properly applies idle / moving scanning algorithms and applies update_others when a client is moving

* Fix bots

* Perform a self and other scan when npc's pop
2020-10-25 23:01:30 -05:00
Akkadius
f78828216d Add support for virtual zonepoints 2020-08-16 00:06:20 -05:00
Akkadius
94d87584aa Lootdrop level filtering adjustments 2020-08-15 16:37:38 -05:00
Akkadius
e03ca7f65e Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-06-29 00:40:27 -05:00
Noudess
efc3832f52 Fix some formatting and change visual label for stacked node names. 2020-06-19 07:43:06 -04:00
Noudess
4a23086183 Fixes to #grid show. Added new string utilities. 2020-05-28 08:41:10 -04:00
Akkadius
3f62da4573 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-23 22:33:34 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
=
263ed3913b Don't scale 0 values 2020-05-06 02:44:17 +00:00
Akkadius
a0f8bbb3b9 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-18 02:31:43 -05:00
Paul Coene
973fd376e5
Propose change in location of Stun check as possible resolution to crash 2020-04-06 08:23:57 -04:00