AttackAllowed(Spawn, Target, Distance, RangeAttack)
Distance default is 0.0f and just checks if you can attack the target.
Otherwise distance greater than 0.0f relates to the distance between the Spawn and Target which you first obtain using GetDistance(Spawn, Target).
RangeAttack is a boolean (default: false) when true we use range info for the ranged attack min/max distance versus max distance melee combat range.
IsInRaid(Spawn, IsLeaderGroup) - Establishes if the Spawn is currently in a raid. IsLeaderGroup is boolean (default: false) returns true if Spawn is the leader group of the raid.
InSameRaid(Spawn, Target, IsLeaderGroup) - determines if Spawn and Target are within the same raid groups. IsLeaderGroup is boolean (default: false) returns true if Spawn is the leader group of the raid.
GetRaid(Spawn, PlayersOnly) - gets the array of all the members in the raid. PlayersOnly is boolean (default: false), if true we return only clients/players in the list for the raid.
Broker/Vault (Fix#10):
- Traditional broker integrated (/frombroker), GM itemsearch is still available via /itemsearch. AoM client cannot sell/use shop, can only buy from broker.
- DoF and KoS client now support House Shop (sell inventory, vault to broker).
- House containers now function like actual containers and can be stored in the vault which will allow placement in the home (to serve as a merchant).
- Sales crate merchant windows in player houses implemented for broker.
- Peering URI's added for broker/shop support: /addseller, /removeseller, /additemsale, /removeitemsale
- House vault and vault slots implemented for DoF, KoS and AoM clients.
Stability and Functionality:
- World Database now has seq_character_items (Sequence) to sync self and peers instantiating new unique IDs for character items. This is to avoid conflict/overriding another unique id.
- spawn and spawn_houses tables have a lua_script that can now be defined outside the existing spawn_scripts table for a singular spawn.
- Fixed a watchdog/hangup when clearing hate lists inside a spawn list lock.
- Item unique id is being transitioned to int64 (although older clients still only support int32, clients later on are int64).
- Fixed so that spells that have no duration will no longer be added to maintained effects.
- Fixed spell cleanup, maintained effect does not remain on the Player causing a crash.
- Fixed spell conflicts to that check all targets are applicable for the spell.
- Fixed issues with maintained effects or spell effects stacking repeatedly.
- Fixed assigning items to non inventory slots when 'adding' an item to the Player.
- Fixed locking orders between maintained effects and spell effects to avoid deadlocks.
- Fixed entering house and visiting houses, targetting of the house door is now enforced server side.
- Item locking is now enforced by the type of locking (eg. house placement, crafting, shop list for sale). Locks no longer override/interfere with each other.
- Additional logging around spell casting and targets.
- Spawns/Objects/Widgets so on related to houses now have their own sub tables _houses, eg. spawn_houses, spawn_npc_houses, spawn_object_houses, so on to avoid conflicting with existing tables non-house.
- new LUA Functions:
ShowShopWindow(Player, FromSpawn) - opens shop window for player (if in their house) for listing, pricing items, retrieving sales log and coin, etc.
SetSpawnHouseScript(Target, LuaScript) - Utilized in the item script 'placed' function to set the spawned house item's lua script.
SendBook(Target, ItemID) - Sends the book to the target player based on the item id.
GetPickupItemID(Spawn) - Gets the item id that the house spawn would represent
SetHouseCharacterID(Spawn, CharID) - Sets the house spawn character id (should be used on Spawn). Set CharID to 0 to set to the current houses character id.
- Updated LUA Functions:
StartHeroicOpportunity(Caster, ClassID, OverrideTarget) - OverrideTarget now available to change the heroic opportunity target
HasItem(Player, ItemID, IncludeBank) - No parameter change, include bank, which serves as 'all' should now work correctly (previously did not check bank/other negative slots), default is false.
- Slash Commands Added:
/sle - Fix#41, Set Location Entry (DB command for setting spawn location entry values such as offsets and overrides)
/store_list_item - used to list an item for broker shop
/store_set_price - used for setting items price for shop
/store_set_price_local - used for inventory items price for shop
/store_start_selling - Begin selling from inventory for shop
/store_stop_selling - Stop selling from inventory
/store_unlist_item - used to unlist an item from broker shop
/close_store_keep_selling - Closes store shop window, but keep selling from inventory while in house
/cancel_store - cancel selling from inventory
Custom spells now survive cross zone with their modified spell stats saved to the database for reloading later. The design is such that a spell can be custom defined for its spell stats, but a character/player cannot have more than one of that spell (eg. food can share a spell id since only one food can be applied to you, but you can't have many spells apply using the same custom spell id).
CREATE TABLE character_custom_spell_dataindex (
charid INT UNSIGNED NOT NULL,
spell_id INT UNSIGNED NOT NULL,
idx INT UNSIGNED NOT NULL,
type ENUM('int', 'float', 'bool', 'string') NOT NULL,
value1 TEXT,
value2 TEXT,
PRIMARY KEY (charid, spell_id, idx)
);
CREATE TABLE character_custom_spell_display (
charid INT UNSIGNED NOT NULL,
spell_id INT UNSIGNED NOT NULL,
idx INT UNSIGNED NOT NULL,
field VARCHAR(64) NOT NULL,
value TEXT,
PRIMARY KEY (charid, spell_id, idx, field)
);
CREATE TABLE character_custom_spell_data (
charid INT UNSIGNED NOT NULL,
spell_id INT UNSIGNED NOT NULL,
field VARCHAR(64) NOT NULL,
type ENUM('int', 'float', 'bool', 'string') NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (charid, spell_id, field)
);
ALTER TABLE transporters
MODIFY COLUMN transport_type ENUM('Zone', 'Location', 'Generic Transport', 'Flight', 'ForceZone')
NOT NULL DEFAULT 'Zone';
This provides the north qeynos teleporters for Temple of Life to work as zone points (with code update):
update transporters set transport_type='ForceZone' where id=43;
update transporters set transport_type='ForceZone' where id=44;