Commit Graph

874 Commits

Author SHA1 Message Date
dongresource 4cd3a3dabd [refactor] src/contrib, src/mingw -> vendor 2021-03-13 02:58:57 +01:00
dongresource f7e9cc2cea Disallow attaching the same item to an email twice
Also fix vendor buying validation not allowing crates to be bought,
since apparently their maximum stack size is 0 in TableData.
2021-03-10 00:13:46 +01:00
dongresource 89eb0b140b Use the right packet for when a player falls out of the world
SUDDEN_DEAD is more appropriate than goo damage for this.
Also made it so other players can see when someone does a /health 0, for
comedic effect.
2021-03-09 21:23:57 +01:00
dongresource f5a34b9a3d Reject completion packets for missions that aren't in progress
Also reject players requesting more than 6 missions.

This is just a minimal measure to prevent replaying mission completion
packets. This part of the codebase will be largely refactored soon, so
more through changes can wait.
2021-03-09 18:30:58 +01:00
dongresource ffe5947925 Keep track of sold items so we can validate buyback packets 2021-03-09 16:45:38 +01:00
dongresource 0fbdb1dad2 Improve sanity checks when opening crates and combining items
And ignore ITEM_MOVE packets while trading.
2021-03-08 22:31:25 +01:00
dongresource d781fae3ba Merge-in the general changes that were on the injusticefoe branch 2021-03-07 15:56:11 +01:00
Jade 3445c0bbc3 Tweaked mob and nano skills 2021-03-07 15:56:02 +01:00
Jade 540c37a523 Aggro is now affected by level 2021-03-07 15:56:02 +01:00
Jade 33a26cda7c Split mob heal types 2021-03-07 15:56:02 +01:00
Jade dc6de46a1f Added ON_COMBAT trigger 2021-03-07 15:55:51 +01:00
dongresource c5e08b81da Implement /ban command 2021-03-07 00:38:24 +01:00
dongresource 5e569d4324 Disallow selling Croc-Potted items
Also, make sure to explicitly terminate the connection when a player is
kicked, and align a few fields in tables.sql.
2021-03-07 00:38:24 +01:00
dongresource f2b1a84ef4 Fix segfault when redeeming more than four items at once 2021-03-06 02:09:21 +01:00
dongresource d5fe1cc513 Work around not being able to reach the shard from a local connection
In certain circumstances, like when running a private server through
Hamachi, the shard IP will be set to an address the local machine can't
reach itself from, preventing only the local player from getting past
character selection. This workaround detects local connections and
sends a loopback address for the shard instead of the configured one.
This makes those use cases feasible.
2021-03-05 19:00:13 +01:00
Jade 81c2a2a8b3 Mob Leech and Freedom 2021-03-05 14:34:08 +00:00
Jade f7c84c62ed Possibly fixed item duping via trading 2021-03-05 14:18:36 +00:00
dongresource da8dde9818 Do not dynamically allocate memory in CNSocket::sendPacket()
Also reorder the rapid fire check in MobManager::pcAttackNpcs(), so the
output packet validation happens immediately before the buffer is
initialized, for clarity.
2021-03-04 19:51:43 +01:00
Gent 29dbe83a0b Skip item stacking logic if items not found in XDT 2021-03-04 11:22:01 -05:00
dongresource 5fdef50f0f Fix failure to summon the highest NPC_ID
And update tdata.
2021-03-03 23:17:36 +01:00
Gent b04c66dea7 Switch AppVeyor Linux builds to Ubuntu2004 2021-03-01 11:42:23 -05:00
CakeLancelot f0f3eaf749 README Revisions 2021-02-24 12:35:04 -06:00
dongresource 217168fe50 Improve DB and Nano sanity checks
I'm aware that the DB checks still allow ID 0 items and Nanos, but the
point of those is primarily to prevent invalid memory access.
2021-01-27 02:27:08 +01:00
CakeLancelot 04a17ed862 Record claimed code items, and other misc DB fixes
* Create new table to store redeemed codes
* Check if a player already used a code when using /redeem
* Change Coordinate columns to non-plural form
* Fixed EmailItems unique constraint not being specific enough
* Bumped DB version to 3
2021-01-19 14:05:54 -06:00
dongresource 74af1ad173 Set iOpt to 1 for mission rewards and disallow trading iOpt 0 items
Co-authored-by: Jade <jadeshrinemaiden@gmail.com>
2021-01-17 22:57:07 +01:00
CakeLancelot b0697f12a3
Update README with link to commands on the wiki 2021-01-08 11:23:44 -06:00
dongresource 34bd7c102f Validate emails as they're being sent 2021-01-06 14:30:25 +01:00
CakeLancelot 9e30e55669 eggBuffPlayer now takes duration, and buff duration is read from EggType 2021-01-06 05:56:54 -06:00
dongresource 46b6d9fcc7 Include CNStructs.hpp in settings.cpp for the ACADEMY define
This fixes the spawn point being wrong.
2021-01-06 12:30:33 +01:00
Jade 2bf3fd0975 Further sanity checks for shops 2021-01-06 11:47:07 +01:00
dongresource 442f85c7a6 Make paths.json academy-specific 2021-01-05 14:07:41 +01:00
dongresource b87229aa65 Reject requests to equip items into the wrong slot
This is important because the client can genuinely send such an invalid
packet by mistake during normal gameplay.

If a sanity check fails, we don't need to send any sort of "move it but
keep it where it is" packet, since simply ignoring the invalid request
doesn't softlock the client.

Also improved validation of inventory slot indexes.
2021-01-05 13:17:59 +01:00
dongresource deca220d43 Do not auto-register all fast travel destinations for GMs
Instead, players with access level 50 or higher can use /registerall and
/unregisterall.
2021-01-05 12:44:38 +01:00
Jade 74e06f1084 Trading Refactor
- Its no longer possible to dupe items by stacking inventory slots in a trade.
- Stacked items work correctly now.
2021-01-04 23:57:50 +01:00
Jade ddc7caf959 Basic Anti rapidfire 2021-01-04 23:57:50 +01:00
Jade 6baa0c5b07 Group related fixes
- Group adding is not leader only now
- Group buffs work now
2021-01-04 23:57:50 +01:00
Jade d4eaf83354 Fixed Instancing Bugs 2021-01-04 23:53:44 +01:00
Jade 47d13ce39e Fixed Group Mob Retreat 2021-01-04 23:53:38 +01:00
Jade 2b95bc660c Fixed Quest Item Bug 2021-01-04 23:52:15 +01:00
dongresource 0e3fac4d34 Updated tdata and changed how the default JSON paths are resolved 2021-01-04 17:08:44 +01:00
CakeLancelot 89e4b2be22 Re-add descriptive artifact names 2021-01-02 10:22:35 -05:00
Gent S 28543641bb Properly parallelize Windows builds 2021-01-02 10:22:35 -05:00
Gent S 888f0e77f9 Use GCP instead of default cloud for AppVeyor builds 2021-01-02 10:22:35 -05:00
dongresource 4516227a7b Fix a few GM issues
* Invert access check when kicking players
* Add validation to ensure only GMs can PVP
* Account for instance in /teleport2me
2021-01-01 21:38:03 +01:00
Gent S 954cfabde5 Add ID gaps for missing NPCs in Academy 2020-12-31 11:26:17 -05:00
dongresource 52e3c3bcd7 Comment out the spawn coords in config.ini
They're not often changed, and keeping two sets of them in the config
file is messy when the right set is automatially chosen by the ifdef in
the server itself.
2020-12-31 14:13:14 +01:00
dongresource 966bd3edd2 Group members share the same mob drops
This includes quest items.
2020-12-31 14:13:14 +01:00
dongresource dab204ddaf If compiled for Academy, do not spawn NPCs in the Future zone 2020-12-31 14:13:08 +01:00
dongresource bad8ef1d10 Kill players that fall out of the map 2020-12-31 12:51:36 +01:00
dongresource a12acbb68f Implement most of the remaining client-side GM commands
* Muting a player's freechat
* Kicking players
* Querying info about a player
* Teleporting yourself to a player
* Teleporting a player to yourself
* Teleporting a player to another player
* Teleporting a player to arbitrary coords
* Teleporting a player to arbitrary coords in an arbitrary mapnum
* /unstick

Also:
* Renamed misleading setSpecialPlayer() to setValuePlayer()
* Revamped monitor logic
* Added server-side checks to account level 50 commands
* Made sure even trade chat is run through sanitizeText()
* Moved setSpecialState() closer to its calling functions
* Interpret client commands even in Buddy and Group chat (but not in
Trade chat)
2020-12-31 12:51:31 +01:00