Fix#326 - buy from merchant can have the 'buy' button disabled
function buy_display_flags(Item, Spawn)
return 128
end
charactersProperties -> character_properties
CREATE TABLE `character_properties` (
`charid` int(10) unsigned NOT NULL DEFAULT 0,
`propname` varchar(64) NOT NULL DEFAULT '',
`propvalue` varchar(64) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
drop table charactersProperties;
drop table charactersproperties;
- some misc crash fixes, sql escape issue, etc.
Fix#231 - item_description function which returns a string added to ItemScripts. Can allow setting of specialized red text, eg "You already know this language.". Completes 231 with the other ItemScripts support (item_difficulty) and scribing support
which includes a new rule:
RULE_INIT(R_Spells, RequirePreviousTierScribe, "0"); // requires step up apprentice -> apprentice (handcrafted?) -> journeyman (handcrafted?) -> adept -> expert -> master
Fix#323 - check in main equipment (0) slots for bags only which addresses the appearance overriding bags issue.
- DoF and classic clients will auto login after char creation instead of getting stuck at character select
- model_color and soga_model_color properly tracked on login server
- Removed ServerOP_WorldListUpdate code (revisit at a later time)
- Login account flag fix, sets Veteran Bonus under 'Select Character' yellow (vs greyed out), adventure/tradeskill bonus 200%
- Fixed disabled flag in login_worldservers not working
- Added login_bannedips table
- Both are checked periodically against the database with logged in worlds
Fix#300 - appearance inventory saved to database, can equip and overrides normal equipment. Also fixed appearance properly updating (it wasn't sent other than in zone in primarily)
Fix#322 - rule to disable house alignment requirements
RULE_INIT(R_Player, DisableHouseAlignmentRequirement, "1");
Fix#311 - defines for root/snare as spell types
#define SPELL_TYPE_ROOT 15
#define SPELL_TYPE_SNARE 16
Fix#301 - loot_global needs a lua_script to access the ZoneScript and call function loot_criteria(Spawn)
loot_criteria_zone(Zone, Spawn, LootTableID, MinLevel, MaxLevel)
loot_criteria_racial(Zone, Spawn, LootTableID, MinLevel, MaxLevel)
loot_criteria_level(Zone, Spawn, LootTableID, MinLevel, MaxLevel)
Spawn: the target of the loot table to be added
LootTableID: the current loot table id we are checking to add to the Spawn
MinLevel/MaxLevel: Criteria from the global loot table that is handled via code (eg. always add if minlevel/maxlevel is 0, otherwise it is based on the Spawn's level)
return value of 0 will skip the provided LootTableID(int32) despite the database MinLevel/MaxLevel checks
return value of 1 will always include the loot table id on the Spawn list, even overriding if the min/max level check fails in the code
Issue #231 partially addressed, added support to override item_difficulty in the item script based on the arrow color (3 is white):
function item_difficulty(Item, Spawn)
return 3
end
Complete Fix#305
- Other players pets (grouped) will persist buffs, non-grouped direct target also persist
- Save spell state added to persist beyond the self player since targets/spells can evolve rapidly with other players/npc/pets in the mix, resulted in two new rules:
RULE_INIT(R_Spells, PlayerSpellSaveStateWaitInterval, "100"); // time in milliseconds we wait before performing a save when the spell save trigger is activated, allows additional actions to take place until the cap is hit
RULE_INIT(R_Spells, PlayerSpellSaveStateCap, "1000"); // sets a maximum wait time before we queue a spell state save to the DB, given a lot can go on in a short period with players especially in combat, maybe good to have this at a higher interval.
- /spawn details now includes the stat / base stats (STR/AGI/STA/INT/WIS) of an entity (NPC/PET/Player)
- SetInfoStructUInt and GetInfoStructUInt now support interaction_flag, when not set we will default to 12 which is looking at other players nearby.
- Fixed NPCs / Pets having spell bonuses, base stats updated (sta/str/agi/wis/int)
- Deprecated GiveImmediateQuestReward
- With spell persistence (groups, direct target and self pet) added new rule options for cross zone buffs:
RULE_INIT(R_Spells, EnableCrossZoneGroupBuffs, "0"); // enables/disables allowing cross zone group buffs
RULE_INIT(R_Spells, EnableCrossZoneTargetBuffs, "0"); // enables/disables allowing cross zone target buffs
Appreciate the fix, 0xFF is ok for server side, client needs 0xFFFF for certain quantity fields to blank out the quantity I guess is the difference to note.
Issue #305 - partially implemented cross zone spells. Buffs will cross with you for self, group spells can re-attach if the caster enters the zone first. Pet spells will recreate the pet, but name and other buffs to the pet do not persist cross zone. WORK IN PROGRESS!!
Fix#310 - no sale option supported on merchants and saved to database, see additionalfields_mar6_2021.sql
Fix#309 - mastery skills all update now and relate to fizzle (ordination, ministration, etc)
Fix#308 - fizzle support added
RULE_INIT(R_Spells, EnableFizzleSpells, "1"); // enables/disables the 'fizzling' of spells based on can_fizzle in the spells table. This also enables increasing specialized skills for classes based on spells/abilities.
RULE_INIT(R_Spells, DefaultFizzleChance, "10.0"); // default percentage x / 100, eg 10% is 10.0
RULE_INIT(R_Spells, FizzleMaxSkill, "1.2"); // 1.0 is 100%, 1.2 is 120%, so you get 120% your max skill against a spell, no fizzle
RULE_INIT(R_Spells, FizzleDefaultSkill, ".2"); // offset against MaxSkill to average out to 100%, default of .2f so we don't go over the threshold if no skill
Fix#303 - Brokers now use /frombroker instead of /itemsearch to show correct icon (money stack like merchants)
Fix#291 - implemented selling for status, no buy back, city merchant type (set merchant_type in spawn to 64) allows selling for status
Fix#250 - Added a caching of state to send a single shoot of visual state. When setting visual states for chests it was causing opening/closing of the chest if you were not already in range of it. See SendStateCommand and ProcessStateCommands in client.cpp for more
Fix#302 - Integrated GiveQuestItem into the Client::DisplayQuestComplete / Client::AcceptQuestReward process. There is support for temp rewards/status/coin.
LUA Functions added, ONLY CALLED BEFORE GiveQuestItem, NOT to be used with GiveQuestReward
SetStatusTmpReward(quest, status)
SetCoinTmpReward(quest, coin)
- Also addressed quests not updating properly in the journal where sub tasks would completely disappear
Fix#299 - AoM client Addressed hot swapping a bagged item to equipment slots poofing the item. Note: DoF client seems to have inventory issues of its own, those are not addressed here
Fix#207 - Chests have new rules for exposure times
RULE_INIT(R_Loot, ChestUnlockedTimeDrop, "1200"); // time in seconds, 20 minutes by default, triggers only if AllowChestUnlockByDropTime is 1
RULE_INIT(R_Loot, AllowChestUnlockByDropTime, "1"); // when set to 1 we will start a countdown timer to allow anyone to loot once ChestUnlockedTimeDrop elapsed
RULE_INIT(R_Loot, ChestUnlockedTimeTrap, "600"); // time in seconds, 10 minutes by default
RULE_INIT(R_Loot, AllowChestUnlockByTrapTime, "1"); // when set to 1 we will allow unlocking the chest to all players after the trap is triggered (or chest is open) and period ChestUnlockedTimeTrap elapsed
Fix#297 - Prevent stacking of food / drink effects. Also added spell_type Food and Drink to enumeration. When these are set it tells the server these are unique effects to food/drink and cannot stack with other consumed items.
In conjunction with this fix, auto consume is implemented (while in zone). Flips the auto consume on/off option as well as 'yellow tints' the background behind the auto consume options when 'on'.
Issue #305 has been created to allow 'cross zone' of maintained effects / effects on the player.
- Few additional fixes:
* if you remove an item from inventory and there is a dialog screen, you can now close it (see last parchment in Taint quest before main boss mob, it wasnt letting you put the parchment away).
* equipment serialized to the player now always includes the player pointer, this was causing menu item information for food/drink to be omitted on zone-in
*
- Few crash fixes, Deleting spells on players from lua_interface when zoning, protection on QuestStep instantiation, we recreate all the ids and locations so as to not be dependent on the prior step should it be deleted
Fix#267 - spell stacking restrictions in place
min_class_skill_req is now pulled from the database
sint32 type_group_spell_id added to spells, can use this to distinguish spells of different classes not competing (eg. wards of templar/inquisitor dont stack)
GetSpellData and SetSpellData support min_class_skill_req and type_group_spell_id
Fix#256 - status points function and SetInfoStructUInt can set them
Fix#273 - fields in player profile not updating
Fix#290 - add SetSpawnGroupID(Spawn, group_id) lua function
Fix#289 - pets don't follow
Fix#288 - FaceTarget(Originator, Target, disable_action_state) - disable_action_state defaults to true
Fix#287 - pause on hail
RULE_INIT(R_Spawn, HailMovementPause, "5000"); // time in milliseconds the spawn is paused on hail
RULE_INIT(R_Spawn, HailDistance, "5"); // max distance to hail a spawn/npc
Fix#286 - PauseMovement(Spawn, time_in_ms) added
Fix#261 - spawn_npcs added water_type and flying_type, temp rules added also
alter table spawn_npcs add column water_type tinyint(1) unsigned not null default 0;
alter table spawn_npcs add column flying_type tinyint(1) unsigned not null default 0;
RULE_INIT(R_Spawn, UseHardCodeWaterModelType, "1"); // uses alternate method of setting water type by model type (hardcoded) versus relying on just DB
RULE_INIT(R_Spawn, UseHardCodeFlyingModelType, "1"); // uses alternate method of setting flying type by model type (hardcoded) versus relying on just DB
xp_debt in InfoStruct changed to float use SetInfoStructFloat and GetInfoStructFloat for it
SpawnScript file is now listed in /spawn details on the last page
LUA functions added:
bool GetRuleFlagBool(category, name)
float GetRuleFlagFloat(category, name)
int32 GetShardID(Spawn)
int32 GetShardCharID(Spawn)
int64 GetShardCreatedTimestamp(Spawn)
bool DeleteDBShardID(shardid) -- using GetShardID
int32 GetCharacterID(Spawn)
bool SetAccessToEntityCommandByCharID(Spawn, CharID, command_string, val) -- same as SetAccessToEntityCommand, but using a CharID instead of player
Rules added:
RULE_INIT(R_Combat, DeathExperienceDebt, "50.00"); // divide by 100, 50/100 = .5% debt per pve death
RULE_INIT(R_Combat, PVPDeathExperienceDebt, "25.00"); // divide by 100, 25/100 = .25% debt per pvp death
RULE_INIT(R_Combat, GroupExperienceDebt, "0"); // set to 1 means we will share debt between the group
RULE_INIT(R_Combat, ExperienceToDebt, "50.00"); // percentage of xp earned to debt vs obtained xp 50/100 = 50% to debt
RULE_INIT(R_Combat, ExperienceDebtRecoveryPercent, "5.00"); // recovery percentage per period of time, 5/100 = 5% recovered (so if .5% debt, .5*.05 = .025, .5-.025=.475% debt left)
RULE_INIT(R_Combat, ExperienceDebtRecoveryPeriod, "600"); // every 10 minutes (x*60 seconds) recover ExperienceDebtRecoveryPercent
RULE_INIT(R_Combat, EnableSpiritShards, "1");
RULE_INIT(R_Combat, SpiritShardSpawnScript, "SpawnScripts/Generic/SpiritShard.lua");
RULE_INIT(R_Combat, ShardDebtRecoveryPercent, "25.00"); // recovered percentage of debt upon obtainig shard, 25/100 means 25%. If there is .5 DeathExperienceDebt, .5*25% = .125, .5 - .125 = .375
Fix#277 - hp / power regen rewrite
Also added power_regen_override and hp_regen_override, when set to 1, you can LUA manually set hp_regen and power_regen to enforce it in code
RULE R_Spawn, ClassicRegen added. Set to 1 means we do not have both regens when out of combat (eg. out of combat = out of combat regen + in combat regen). In classic you only received in combat or out of combat regen individually.
Fix#278 - HatedBy now properly handled, we know when a player/spawn is being hated by other targets
Fix#275 - Parry/Riposte, Block and Dodge implemented. Missing Block formula which will become its own issue.
Entity GetInfoStruct/SetInfoStruct, cur_avoidance, parry, parry_base, deflection, block are now floats. Added sint16 power_regen adn hp_regen, lastly power_regen_override and hp_regen_override are int8's.
Fix#274 - Implemented stats Crushing, Defense, Deflection, Disruption, Fishing, Focus, Foresting, Gathering, Mining, Parry, Piercing, Safe Fall, Slashing and Trapping
/waypoint command now allows flushing waypoint if you do not have active target
/spawn details [x] supports behind, infront and flank
/craftitem added per EmemJr update
INSERT INTO commands SET TYPE=1,command='craftitem',subcommand='',HANDLER=526,required_status=100;
Crash fix for /add_aa hitting bad spell id
LUA Functions:
RemoveSpawnSpellBonus(spawn) - used in LUASpell script
GetSpell(spell_id, tier, custom_lua_script) - third argument added to setup custom script file
AddIconValue(spawn, value)
RemoveIconValue(spawn, value)
Fix#169 - evac now works correctly, no ghost spawn of self and you can go into combat and see damage taken/given.
Also simplified the player spawn / index map (had duplicates unneeded)
Fixed region_map_v1 throwing errors on special variable for signed vs unsigned
Allows to stop the bot from following you or continue following when in group. Also fixed the default runspeed on NPC's to be set to MaxSpeed. Should resolve any unexpected stationary npc's/bots.
Partial address issue #246 - normal mail can be sent/received without corrupting the packet. 'Double' 0x80 item packets need serialize support, LE was working on it for crafting, holding off fully addressing 246 with that addition.
Fix#253
bool return = SetEquippedItemByID(Entity, slot, item_id)
bool return = SetEquippedItem(Entity, slot, item)
return = false if it fails to set the item, means the slot is in use already, have to unequip first
UnequipSlot(Entity, slot, no_delete_item) -- does delete the item upon unequipping by default, otherwise set no_delete_item = true
SetEquipment(Entity, slot, type, r, g, b, h_r, h_g, h_b) -- (r = red, g = green, b = blue, h_ = highlights)
Fix#199
/movecharacter name zonename
updates the characters table, moves to safe x,y,z,heading of zone
character should be logged out, otherwise there is no point to using this command (just gets overwritten on char save).
- /castspell command updated for third argument, when set to '0' will cast as 'self' as it were the target. eg /castspell 1234 1 0 (will cast spell id 1234 tier 1 and self cast it on your target)
Fix#230
- Fixed titles, DB and code were inconsistent thus / commands did not work
- LUA Functions added:
AddMasterTitle(titleName, isPrefix) -- adds a new title all characters can use, isPrefix is 0 or 1, 1 for prefix, 0 for suffix
- returns master title id (sint32) -- if the title already exists, then it re-uses that id
AddCharacterTitle(Spawn, titleName) -- adds a character title to a spawn if not already present
- returns character title index id (sint32)
SetCharacterTitleSuffix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first
SetCharacterTitlePrefix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first
ResetCharacterTitleSuffix(Spawn) - empties title suffix
ResetCharacterTitlePrefix(Spawn) - empties title prefix
Example usage of some of the LUA commands:
AddMasterTitle("Stupendously Special", 1) -- create new title for all players, is prefix
AddCharacterTitle(Spawn, "Stupendously Special") -- add title to the current player
SetCharacterTitlePrefix(Spawn, "Stupendously Special") -- set the characters current prefix to the newly created title
Fixed spell error messages for DoF client
Fixed food/drinks for DoF client
Changed items to allow archetypes to use an item if all the classes in the archetype are allowed to use it
Added a ton of LUA functions to support various gameplay features
Loot icon only added to corpse if the corpse has loot
Class skills will now rise appropriately with level
Fixed various bugs
Issue #71
- Region Maps support water! Later on to add lava/no fly/other potential regions
- new LUA functions:
* InWater(spawn)
* HasControlEffect(spawn, type)
* GetBaseAggroRadius(spawn)
* GetAggroRadius(spawn)
* SetAggroRadius(spawn, distance, override) - override true sets base to this, otherwise its temporary and doesn't impact GetBaseAggroRadius
* SetDeity(spawn, value)
Changed string* WorldDatabase::GetZoneName to string WorldDatabase::GetZoneName, this will prevent memory leaks when people forget to delete the memory
Changed ZoneScripts to use the one in the ZoneScripts directory if the lua_script field in the zones table is empty, but the zonescript file exists on disk, warning is displayed it World
Spells/Fighter/Crusader/Shadowknight/Painbringer.lua
function customspell(Spell, Caster, Target)
SetSpellData(Spell,"name","Painbringer 2.0!")
end
sets name to Painbringer 2.0! instead of 'Painbringer'
- Allows custom spell_display_effects
- Spell examine is now unique to the spell cast, we have to create a unique spell id that is temporarily used by the custom spell to accomplish this
eg.
Spell = GetSpell(90044, 1)
SetSpellDisplayEffect(Spell, 0, "description", "Applies Painbringer. Lasts for millions of seconds!")
CastCustomSpell(Spell, Player, Player)
result: https://cdn.discordapp.com/attachments/684934458738212962/758297380302225418/unknown.png
Standardized the message numbers and will send the correct one based on client version
Fixed /tell to not assume that both clients were the same version
Tons of quest fixes
Fixed various spawn bugs
Complete Fix#196 - need to rebuild the SpellData structure so as to not mess with the base Spell's memory. Also delete the inner spell when we RemoveSpell since its only a one-off.
Fix#196 - LUA custom spell support (for things like item scripts)
Fix#195 - Alignment LUA functions
CastSpell now has a cast_time argument extended to it
- Fixed a async query for npc_appearance on skin_color to use insert param
- spell 'remove' function now has third parameter 'reason', canceled, expired, purged, death and pet_death
SpawnSet(NPC, "skin_color", "255 0 0", false, true)
skin_color takes in 3 arguments as a string, R G B
two new parameters after value:
- no_update, when set to true (default false, its an inverse flag of send_update) we will not send update of spawn changes
- temporary_flag, when set to true database is not update (default false again to keep compat with LUA scripts).
SpellHeal(Spawn, "heal", min, max, NPC, 0, 0, "New Spell Name")
Prevents corruption in the group member pointers.. clients couldn't see each other in group lists or chat to each other depending on special conditions
- Fix lifetime of remove_target_list Spawn* -> int32 entity ID (resolve entity id to spawn on demand, makes sure we don't have a dead ptr)
- Fix for hang behavior with mutex lock when coming in from LUA spell functions
after 30 seconds of zone process hung, attempt normal shutdown. If at 60s then force SpawnProcess/ZoneProcess threads to cancel (only linux supports 60s feature to cancel thread). For windows 60s+ is only notification and does not attempt to cancel threads.
second stage for linux may/may not succeed (either shuts the zone down or crashes the world). Idea being this is worst case scenario to try to recover/make server owner aware of the hung nature of the zone.
Fix#66
- Fixed crashing of the world server when a client in a group zones
- Tracking of players group_id in the characters table (for both sanity and tracking cross zone)
- Clients zoning now properly 'rejoin' their group
- Mutex locks added to group code, this makes groups more reliably work across different zones as they run on different threads (some behavior for example was some players would not see chat and others would)
- multimap needs to be used for various key matches
- fixed class matching
- Put a short tic wait for the async queries to hit the DB. Eventual solution here really would be that all character loading (char sheet/spells/etc) should be done async.
Fix#165 - support adding starting skills/spells to characters after their initial creation
/reload startabilities added
insert into commands set type=1,command='reload',subcommand='startabilities',handler=522,required_status=100;
Classic/DoF client use only a single float, then later a direction was added. Not clear what version exactly, however struct will function despite the extra int8.
Fix#164 -- for now we will try the tier sent by client and fallback to tier 1 if it can't be found, if at that point we still fail we will not send any packet to the client.
Fix#151 - activity_status / entity_flags used for DoF client also activity_status was in the wrong place, solid_object for classic client now set properly in code