Fixed the queue being used while we process existing queries from the same query id group. We subsequently check at the end of the thread if more queries are available to process and start a new thread to build a new temp queue.
Fixes#60
Login server needed to call LogStart, world server needed to call earlier (messages were getting recorded out of order without the timestamps)
Fixes#44
Database class now has the ability to asynchronously run queries that don't tie up the process threads.
This is being utilized right now for character saves as that seems to be the slowest process. However query id's (and potentially extension of such) can allow anything to be asynchronous -- and later on even add return vars.
Fixes#55 - check on if an account exists or not before attempting an account creation (we still rely on the DB to do the password comparison as its own query)
Fixes#49
Added group triggers to disarm chest traps.
Rule R_Loot, ChestTriggerRadiusGroup added (by default 10.0f). Outside radius group members will not be impacted
Radius is now built into the GetDistance formula, it also is based on f32/32.0f per recommendations of peak (Thx peak!)
Added combat range as a rule: rule_manager.GetGlobalRule(R_Combat, MaxCombatRange)->GetFloat()
Fixes#53
- Added rule R_Loot, AutoDisarmChest enabled (1) by default. Setting to 0 will mean you must right click and disarm chest, clicking the chest will not auto disarm and instead always trigger the trap
Fixes#47
Fixed spawn combine save, was previously crashing (RemoveSpawn called multiple times) and also giving the wrong spawn location id as well (in the message output to the client)
Fixes#54
Base chance to resist interrupt was 30%, increased to 50%. Maybe later on a level restriction to reduce when you are much higher level than your target.
Fixes#34
- LoginServer and LoginConfig blocks now break out if we enter a new block (previously the ini was read all thru)
- Upon a failure from login server, world server will attempt to reload the ini (you can change account name/password on the fly if it is wrong)
This includes creation of a new parameter in the LoginServer.ini, AccountCreation in the LoginConfig block can be 0 to disable, by default it is 1 (or if the field is not defined, its considered true)
Fixes#51
Fixes#10
LS database:
- md5 no longer used, now use sha2('password',512) instead for mysql/mariadb
- account table passwd expanded to 256 chars
- login_worldservers password field expanded to 256 chars
manual update:
\u eq2ls
alter table account modify column passwd varchar(256) not null default '';
alter table login_worldservers modify column password varchar(256) not null default '';
Fixes#24 - chest traps and the ability to disarm is implemented. Can restrict by zone (or applicable to all zones using -1), min and max chest difficulties.
1 = Small Chest (no trigger)
2 = Treasure Chest (trigger)
3 = Ornate Chest (trigger)
5 = Exquisite Chest (trigger)
DB/updates/chest_traps_tableandsamples.txt included - this will allow you to source in the chest_traps and some 'example' traps (not real ones just testing ones).
Disarm command also required for right click option on chest: insert into commands set type=0,command='disarm',subcommand='',handler=510,required_status=0;
Fixes#42
- Invisibility support for PVP
- Rule R_PVP InvisPlayerDiscoveryRange added. Default 20. Setting to 0 means invis players are always seen. -1 means they are never seen (unless their opponent has see invis for example)
- Crash fix back in ProcessSpawnConditional, spawn_list is getting a null spawn somehow, we can't process it!
Command_Hail needs to lock MSpawnList when it triggers ProcessMovement. When we are doing SpawnProcess however, we already have MSpawnList locked, no need to lock again.
Fixes#28
/loot list add loottable_id
/loot list remove loottable_id
/loot list clearall
auto reloads loot, purges previous loot and re-assigns loot to selected spawn.
If you have multiple of the same spawn, then /repop the zone and it will repopulate after one is updated.
Added support for /spawn move openheading and /spawn move closeheading -- this works on widgets only. You can set the heading without worrying about the x,y,z position, will auto update and new headings will be used.
include_heading is also updated in the DB to 1.
Fixes#32.
This is a tough situation here, question is if Combat code can somehow call LUA and lua calls back to KillSpawn, so this might go both ways...
Entity::DamageSpawn
GetZone()->CallSpawnScript(victim, SPAWN_SCRIPT_HEALTHCHANGED, this);
This could if calling KillSpawn on that script action cause a deadlock
Fixes#25
/castspell [spellid] (tier=1) - Cast Spell with specified spell id, tier is optional, default of 1.
/castspell [spellname] - Find spells wildcard match with a partial spell name
cannot damage self with current setup.
sql query required: insert into commands set type=0,command='castspell',subcommand='',handler=509,required_status=200;
- Added GENERIC doors to be opened after use timer expires (CastProcess)
- CastProcess now tracks a target by the int32 spawn id instead of relying on the static target. For example trying to double click on a door that has a use action, this would lose target and the door would fail to open. Fixes#23.
Updated /spawn details to include a radius option if no target is selected, eg. /spawn details 5 - for a radius of 5. Gets some general spawn information (location id, spawn id, widget id, etc.)
Character Save / WritePlayerStatistic updated to check if characterid is set (in case client disconnects before character loads)
Default char_id of 0 set for Player class
Added a sql_updates.sql file for WORLD with _DEBUG define so we can more easily push updates made in game to each other
Flymode wasn't enabling cross zone correctly at times, moved it to later on in the zone in process.
Made it so flymode off doesn't trigger on zone in(don't need to know if its off, only on).
Fixes#21 - need cross zone capabilities for speed, flymode and invul
Fixes#22 - NPCs that are alive should not be looted (also /loot command was causing npcs to poof if you attempted to loot npc with no loot)
Added Trade command for Right Click.
Resolved quantity length for both traders in a trade, your_item_quantity, their_item_quantity (was int16, now int32)
Seems localtime struct ptr is not being returned, thus we crash (might be something with my environment), however for now adding a check to stop us from crashing.