32 Commits

Author SHA1 Message Date
Alex King
1e8889a9fc
[Bug Fix] Fix issue with 9th/10th inventory slot (#3835)
# Notes
- Code was not checking for a `-1` value and was assuming everyone used valid bitmasks.
2024-01-03 17:34:24 -05:00
Alex King
f3ef8a0993
[Quest API] Add SummonItemIntoInventory() to Perl/Lua (#3797)
* [Quest API] Add SummonItemIntoInventory() to Perl/Lua

# Perl
- Add `$client->SummonItemIntoInventory(item_data)`.

## Example
```pl
sub EVENT_SAY {
	if ($text=~/#a/i) {
		my %item_data = (
			"item_id" => 32557,
			"charges" => 1
		);
		$client->SummonItemIntoInventory(\%item_data);
	}
}
```

# Lua
- Add `client:SummonItemIntoInventory(item_data)`.

## Example
```lua
function event_say(e)
	if e.message:find("#a") then
		local item_data = {
			"item_id" = 32557,
			"charges" = 1
		}
		e.self:SummonItemIntoInventory(item_data)
	end
end
```

* Update effects.cpp
2023-12-22 02:45:40 -06:00
Alex King
bc71997518
[Bug Fix] Fix _PutItem having a slot_id of -1 on mobs with no items (#3474)
# Notes
- This was causing an insane amount of error logs because we were always using `PutItem`, even with a `slot_id` of `-1`.
2023-07-03 20:33:21 -04:00
Alex King
8d986c95cd
[Commands] Add #finddeity Command (#3435)
# Notes
- Add `#finddeity` command.
- Remove `ConvertDeityTypeBitToDeityType` as it's unused.
- Rename `ConvertDeityTypeToDeityTypeBit` to `GetDeityBitmask`.
2023-06-25 23:00:32 -05:00
Alex King
e11610b9fa
[Cleanup] Remove unnecessary check for IsStackable() in DeleteItem() (#3186)
# Notes
- We check the opposites therefore we don't need either.
- https://pvs-studio.com/en/docs/warnings/v728/
2023-04-05 11:20:13 -04:00
Alex King
d7ae3d5c6d
[Quest API] Add GetAugmentIDsBySlotID() to Perl/Lua. (#2673)
* [Quest API] Add GetAugmentIDsBySlotID() to Perl/Lua.

# Perl
- Add `$client->GetAugmentIDsBySlotID(slot_id)`.
- Add `$inventory->GetAugmentIDsBySlotID(slot_id)`.

# Lua
- Add `client:GetAugmentIDsBySlotID(slot_id)`.
- Add `inventory:GetAugmentIDsBySlotID(slot_id)`.

# Notes
- Allows operators to get a list of augments from a specific slot instead of having to build a plugin or something to do it.
- Fix issue with Lua tables starting at index `1` versus index `0`, so you lost the first value of the table due to this.

* Update inventory_profile.cpp
2022-12-25 15:14:54 -05:00
Chris Miles
dfd8f84cac
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint

* More functions converted

* Commify

* More functions

* Fin

* Sort declarations

* Split functions between files

* Bots

* Update strings.h

* Split

* Revert find replaces

* Repository template

* Money

* Misc function

* Update CMakeLists.txt

* Saylink

* Update strings.cpp

* Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database

* API casings
2022-07-14 02:10:52 -05:00
Kinglykrab
a5d8a64792
[Quest API] Add inventory->CountItemEquippedByID(item_id) and inventory->HasItemEquippedByID(item_id) to Perl/Lua. (#1963)
- Add $inventory->CountItemEquippedByID(item_id) to Perl.
- Add $inventory->HasItemEquippedByID(item_id) to Perl.
- Add inventory:CountItemEquippedByID(item_id) to Lua.
- Add inventory:HasItemEquippedByID(item_id) to Lua
2022-02-06 13:21:48 -05:00
Kinglykrab
3a94132749
[Quest API] Add multiple augment related methods to Perl/Lua. (#1930)
* [Quest API] Add multiple augment related methods to Perl/Lua.
- Add $inventory->CountAugmentEquippedByID(item_id) to Perl.
- Add $inventory->HasAugmentEquippedByID(item_id) to Perl.
- Add $item->ContainsAugmentByID(item_id) to Perl.
- Add $item->CountAugmentByID(item_id) to Perl.
- Add inventory:CountAugmentEquippedByID(item_id) to Perl.
- Add inventory:HasAugmentEquippedByID(item_id) to Perl.
- Add item:ContainsAugmentByID(item_id) to Perl.
- Add item:CountAugmentByID(item_id) to Perl.

* Update inventory_profile.cpp
2022-01-16 18:04:51 -05:00
Kinglykrab
3efd9c7f60
[Cleanup] Convert DeleteItemInInventory quantity to int16. (#1767)
* [Cleanup] Convert DeleteItemInInventory quantity to int16.

* Type conversion.
2021-11-16 08:52:22 -05:00
Cole-SoD
61d1eeab6f
Minor corrections (#1582) 2021-10-04 17:26:02 -04: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
Akkadius
98cbb7d781 Simplify log calls 2019-09-01 21:04:58 -05:00
Uleat
7b2c87c7ed Added bi-state dynamic lookup return 2019-01-20 23:40:40 -05:00
Uleat
703cbc6727 Activated per-expansion support for active inventory slot addressing 2019-01-15 00:50:58 -05:00
Uleat
bcf271c30f Added dynamic entries to eqdictionary 2019-01-12 20:03:52 -05:00
Uleat
011d7a6a29 Updated EQDictionary entries to allow ease of reading and gui tooltip propagation 2019-01-07 00:11:07 -05:00
Uleat
1ba6801bb2 Fix for UF and older clients' experiment combine failure 2018-10-05 07:54:42 -04:00
Akkadius
40cb53f5a4 Syntax, naming and formatting tweaks 2018-08-17 23:54:24 -05:00
Uleat
509a2b30a5 Inventory possessions beta testing 2018-08-13 22:32:36 -04:00
Uleat
c435a77813 Reintegration of inventory-based EQDictionary references 2018-07-05 21:05:26 -04:00
Uleat
5d9a89dcd1 Damn base values... 2017-04-02 16:21:13 -04:00
Uleat
23115ca177 Disabled deity checks in item swaps until issue is 100% resolved 2017-04-02 15:35:13 -04:00
Uleat
13af1bfe6f Added messages for item equip failures 2017-04-02 05:06:13 -04:00
Uleat
60d2c703b6 Hack fix for an outdated inventory function 2017-04-01 17:40:18 -04:00
Akkadius
7aa1d243b0 [Performance] Reworked how all log calls are made in the source, see changelog.txt for more details 2017-04-01 03:51:46 -05:00
Uleat
999650d368 Fixed a few glitches related to bot trading and other affected code 2017-03-09 01:55:01 -05:00
Uleat
09bbfbcc31 Complete rework of the bot trading system (see changelog.txt) 2017-03-08 08:12:04 -05:00
Uleat
648078d76c More NoDrop-related hack abatement 2016-12-18 20:20:27 -05:00
Uleat
101002d635 Renamed enum class InventoryVersion to MobVersion 2016-10-17 06:32:51 -04:00
Uleat
04f4fd652b Renamed class Inventory to EQEmu::InventoryProfile 2016-10-17 04:59:00 -04:00
Uleat
1cb79c8c1f Separated class Inventory from item_instance files into inventory_profile files 2016-10-17 02:41:09 -04:00