183 Commits

Author SHA1 Message Date
Akkadius
8a28e8500d Make fear and fleeing respect navmesh for both clients and NPCs 2018-09-03 03:06:23 -05:00
Akkadius
eb463eef97 Tweaks to zone shutdown code 2018-05-12 03:31:47 -05:00
KimLS
a53f65d86b Merge and compile fixes (non-bot, will do bots later) 2018-04-16 14:15:08 -07:00
Uleat
e5e779c064 Updated UCS versioning code - update your *.conf files 2018-03-04 21:38:17 -05:00
Michael Cook (mackal)
c5e4bb08f4 Implement global loot system Fixes #619
This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
2018-02-10 22:15:21 -05:00
Michael Cook (mackal)
85bafecc93 Command #repop will clear NPC spell cache now 2018-02-02 20:18:40 -05:00
Kinglykrab
ceb2b287bb Fixed merchantlist probability.
NPCs were setting a singular chance value and each item was checking based on this value, making the probability field not a random chance per item.
This removes the probability field from NPCs, SetMerchantProbability() and GetMerchantProbability() and makes the probability field truly random chance.

Special thanks to ChaosSlayerZ for noticing the issue here: http://www.eqemulator.org/forums/showthread.php?t=41731
2018-01-27 19:08:15 -05:00
Kinglykrab
8e9fa38197 Added #reloadmerchants for zone-based merchant refreshing. 2018-01-27 18:19:48 -05:00
Shea
ee581f27c4 Packet sends with sz 0 do not work on Linux 2018-01-08 19:15:36 -06:00
regneq
ed98aa45d2 Traps overhaul. New functionality has been added, while preserving the old functionality. Numerous bug fixes occurred as well.
Added column triggered_number. If this is set, then the trap will despawn after it has been triggered this number of times. If 0, the trap will never despawn on its own.

Added group column. This allows developers to group traps together in a similar way as spawngroups for NPCs. When a trap that is grouped is despawned in anyway, a random trap in the group will take its place. Grouped traps do not have to be at the same coords or have the same type. This can allow for some spawning diversity if so required. If set to 0, the trap is not grouped and will always respawn.

Added column despawn_when_triggered. If set to 1, then a trap will despawn when a player triggers it. If 0, then there will be a 5 second reset time and then the same trap will again be active. (Assuming triggered_number has not been reached.) The player that triggered the trap will not re-trigger it until they have left and re-enetered the trap's radius.

Traps will no longer trigger on players that are currently zoning. This fixes some weirdness and at least one crash. The trap can trigger however after the connection is been completed. If a player camped out in a trap radius they can potentially still be hit.

Alarm type traps were not using effectvalue2 to determine who should be aggroed. This is now fixed.

Traps will no longer be broken by #repop, #depopzone, or #reloadworld. All 3 commands will now have the same effect on traps as they do for NPCs.

Added command #reloadtraps. This reloads all of the traps in the zone.

Added command #trapinfo. This gives some information about the traps currently spawned in the zone.

Added Traps logsys category

Required SQL:
utils/sql/git/required/2017_10_26_traps.sql
2017-10-27 21:24:24 -07:00
KimLS
6a79694fa1 Merge branch 'master' of github.com:EQEmu/Server into wp 2017-08-31 17:47:33 -07:00
Akkadius
4d3dda23f8 Make #repop work almost instantly 2017-08-18 20:53:26 -05:00
KimLS
5f1063acb9 Add pathfinding interfaces, still heavily wip 2017-07-18 00:01:59 -07:00
Akkadius
5a9744b429 Add a fail-safe for dynamic zone shutdown timers 2017-06-28 21:23:02 -05: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
f77f996c3f Pass through zone code to fix uninitialized pointer declarations 2017-03-23 04:35:36 -04:00
Uleat
04f4fd652b Renamed class Inventory to EQEmu::InventoryProfile 2016-10-17 04:59:00 -04:00
Uleat
8b5dd58e96 Renamed struct EQEmu::ItemBase to EQEmu::ItemData and class ItemInst to EQEmu::ItemInstance 2016-10-16 05:10:54 -04:00
Joshua Packard
329c9c8d98 Reordered zone initialization
Needed to reorder zone init so that the zonemap is loaded before ground spawns are made, otherwise the best Z won't calculate.
2016-09-28 19:26:44 -07:00
Michael Cook (mackal)
89183cf8b7 clang-format LoadZoneObjects 2016-08-27 22:26:44 -04:00
Michael Cook (mackal)
aaa116d97c Add support for object display names
Ex. Kejek Forge in Stonebrunt Mountains
2016-08-27 22:24:08 -04:00
Natedog2012
4de9b2c53e Add TiltX and TiltY manipulation to objects (Perl)
Translate OP_GroundSpawn for Titanium

#perl plugin http://wiki.eqemulator.org/i?Module=Pastebin&Paste=u9IbA6Ql
2016-08-26 06:39:39 -07:00
Michael Cook (mackal)
6a7ea65dd0 Ask water map if we're in a zoneline to prevent false positives
I don't think this should open up any chance to exploit
Trying to use a ZL to go somewhere else is still detected etc

This should really cut down on false positives and we really can't
see real cheater from all the noise this creates
2016-08-05 01:07:12 -04:00
Michael Cook (mackal)
60da544d3a clang-tidy modernize-use-auto 2016-05-25 16:10:28 -04:00
Michael Cook (mackal)
cdbeb24a05 Change emptiness checks to empty() from size() [clang-tidy]
This has two benefits, it's clear what we are checking and
size() isn't always constant time, where empty is (performance!)
2016-05-25 14:57:47 -04:00
Uleat
3031365e1f Moved struct Item_Struct into namespace EQEmu 2016-05-21 04:54:18 -04:00
Michael Cook (mackal)
c159b89e79 Rewrite VarCache_Struct
Basically just remove manual memory management
2016-05-09 14:25:54 -04:00
Uleat
b3475d7b50 Reworked ClientVersion into EQEmu::versions; Added EQEmu::versions::InventoryVersion 2016-04-22 03:49:17 -04:00
Michael Cook (mackal)
d86307c720 Rework say links
We now consume 1 item ID for say links, this means you will be able to create
more items! We used ID 0xFFFFF for this, which is the max ID an item can be
in the item links. You have the rest to play with!

Normal say links pass the ID in the first aug slot and silent say links
in the second aug slot. This means we can have MANY more say links as well!
2016-01-20 22:31:35 -05:00
Akkadius
d64205124f Implemented #repopclose [distance in units] - Used for development purposes, defaults to 500 units
- Real case use: Large zones with 700 NPC's and you are making fast quick tweaks to nearby NPC's you can refresh just the NPC's around you instead of all in the zone
- This can be quite the time saver
- This command will depop all NPC's and only respawn the NPC's that are 500 units around you or unless you specify otherwise
2015-11-07 13:20:24 -06:00
Akkadius
33917fe2a9 - Add Zone Process ID (OS PID) as information passed back to world, ultimately with the ability to display it in the telnet console under 'zonestatus'
- Refactored some zoneserver/worldserver code for readability
2015-10-31 20:19:57 -05:00
Paul Coene
4e538d14c8 Fix snow so it ends correctly. Packet is different from the all zeros sent
to end rain.  End packets need to have the type that is ending.
2015-08-04 09:48:39 -04:00
KimLS
1589169200 AAs should load from character data now, though will be fucked up if you already had stacked aas. 2015-06-10 22:46:57 -07:00
KimLS
3d1dc6314d New style AA data loading, still rudimentary 2015-06-07 19:42:12 -07:00
Akkadius
ee136881c8 Implemented disjointed zone based time, this can be triggered via quest methods
Added parameter to LUA and Perl method settime(hour, minute, [update_world = true])
	- If update_world is false, the zone will then unsubscribe itself from regular worldserver time synchronizations
Added DB ver 9082 with update to add npc_types texture columns if table does not currently have them
2015-05-25 23:48:11 -05:00
SecretsOTheP
788959a5e2 Haynar's movement fixes.
Changes Speed from float to int. EQ client deals with int step locs better than it does floats according to Haynar's testing.

This also contains mob runspeed changes. I recommend you set runspeeds to start in the DB 1.25 for NPCs below 1.25 which will match player runspeeds almost equally. Existing DBs will need to be updated.

General Cleanup of MobAI functions. Mobs now change their heading on AIMovement timers if their targets' heading has changed since that time. This prevents players from being able to land backstabs inbetween mob swings.

Charmed/feared players now send the appropriate packet, there was a missing CastToClient() in spells that was missing.

Mob runspeed can no longer be snared to 0%, instead, 1% of their base runspeed is the maximum. Roots apply as roots instead of a modifier under this code.

There is going to be bugs with this code. It's better we push through it than revert it. Sanctuary has been running this for a good week and we've worked through the issues.

Misc updates:
Exported some variables to perl, including:

EVENT_ITE_CLICK_CAST:
EVENT_ITEM_CLICK:
spell_id - returns the spell_id of the click effect.
return value - cancels the cast.

EVENT_DROP_ITEM:
quantity - returns the # of items dropped in the packet. If the item has charges, charges are returned here instead.
itemname - name of the item being dropped
itemid - id of the item being droppped
spell_id - spell_id associated with the item's click effect.
slotid - the inventory slot id of the item being dropped.
return value - cancels the item from being dropped.

Added Perl function: CalcEXP. Calculates the experience you would gain for an NPC that cons a specific con value to you.

Fixed a bug where you would receive the group experience bonus and group experience messages for simply being in a group, regardless of the player being in the same zone as you.
2015-05-25 12:35:53 -04:00
SecretsOTheP
4a4a0c5e8b * -Exported additional entity IDs for dropped items to perl upon EVENT_CLICK_OBJECT (clicker_id) and EVENT_PLAYER_PICKUP ($picked_up_entity_id)
-Identified Size / SolidType fields in newer clients and properly exported it to EQEmu for use in UF, RoF, RoF2 via perl accessors. (Should work in LUA, no testing was done though for LUA)
-Added a sanity check for size to objects. Any size over 5000.f seems to crash the newer clients' graphical engines and PEQ has some containers filled in with bogus values.
-Added the ability to return a value on perl function EVENT_PLAYER_PICKUP which sends a fake dropped item ID to the client to generate the appropriate client response so the item can stay on the ground and not be 'picked up'. Should also work in LUA, didn't test LUA.
-Renamed unknown008 and unknown010 to size and solidtype respectively for objects.
2015-05-06 18:50:08 -04:00
JJ
de57c94d3e Blocked spell negation fix. 2015-04-23 18:42:17 -04:00
Akkadius
a544c681c7 Implement zone based gravity, required SQL DB change
- To test `zone` table `gravity` values, change the value and use #zheader <zoneshortname> to test
2015-02-12 22:09:17 -06:00
Akkadius
1966324112 Changed NPCTypes Data to bulk load when the zone loads or Repops, this bulk loading is stored in the npc_types cache 2015-02-12 19:57:24 -06:00
Akkadius
cb81d956f6 Reduced #repop time dramatically by taking down hundreds of individual SELECT/DELETE/INSERT queries in routines and bringing it down to very few
See: https://www.youtube.com/watch?v=9kSFbyTBuAk
2015-02-08 05:01:58 -06:00
KimLS
f388a605dd Spelling errors and revised my cle change to put it much lower so it shouldn't have any side effects other than avoiding the crash 2015-01-30 15:03:02 -08:00
Trevius
f17fb2a8e1 Removed "Mercenary Debug:" from the Mercenary Log entries.
Resolved duplicate "You have no Mercenaries" messages when zoning without owning a Mercenary.
Mercenaries should now always be able to unsuspend if the timer is up.
More work on Mercenaries and Grouping to reduce bugs and redundant queries.
2015-01-27 00:35:39 -06:00
Trevius
fc5266e115 Added Logs::Mercenaries to the new Logging System. Logging of Mercenary information is off by default with the required SQL. 2015-01-25 12:31:07 -06:00
KimLS
17af9e3808 Merge fixes, hopefully didn't break anything. 2015-01-23 13:36:27 -08:00
KimLS
269d56e1d0 Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types 2015-01-23 00:01:10 -08:00
Akkadius
b4ff915cbb Change zone file log name format once it boots up 2015-01-21 19:39:51 -06:00
Akkadius
c5447778a6 Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts:
	world/client.cpp
	world/worlddb.cpp
	zone/aggro.cpp
	zone/bot.cpp
	zone/client.cpp
	zone/client_packet.cpp
	zone/client_process.cpp
	zone/doors.cpp
	zone/entity.cpp
	zone/inventory.cpp
	zone/mob_ai.cpp
	zone/perl_client.cpp
	zone/spells.cpp
	zone/waypoints.cpp
	zone/zone.cpp
	zone/zonedb.cpp
	zone/zoning.cpp
2015-01-21 17:29:30 -06:00
Akkadius
3d74035e24 Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts:
	zone/command.cpp
	zone/command.h
	zone/inventory.cpp
2015-01-21 16:40:46 -06:00
Akkadius
ef312b7b48 Remove Duplicative MySQL Error: 2015-01-20 01:38:43 -06:00