Commit Graph

83 Commits

Author SHA1 Message Date
dongresource 9aa9b76826 Made the random characters level 36.
They are meant to make testing faster, after all. No point in
restricting them from fully testing items.
2020-08-25 04:17:47 +02:00
dongresource 113ce0af07 Load the NPC and warp JSON files according to the config file.
NPC data was being read from the config, but ignored.
2020-08-25 03:45:04 +02:00
dongresource 6f1a72ca0f Shut Computress up.
Setting all bits in the first use flags disables tutorial messages.
2020-08-25 03:42:52 +02:00
dongresource d964a83d6d Respawn points work now.
Note that some of them weren't present in clientnpc and will need to be
manually added later.
2020-08-25 03:34:53 +02:00
dongresource 2f1358c124 Potential solution for the tutorial problem.
Will need to be tested on the public server.
2020-08-25 01:57:53 +02:00
dongresource c1b6ae8466 No need to unpack zero-length packet structs.
Also fixed formatting and added subheading to README.md.
2020-08-25 01:08:02 +02:00
dongresource 14bc368073 Dynamically allocate the Player struct in PlayerView.
This way we're not always passing it around by value.
Note that the Player structs in CNSharedData are still
pass-by-reference. Will probably change this later.
2020-08-25 00:59:55 +02:00
CPunch 6d3868349d removed debug output in keepAliveTimer 2020-08-24 16:12:49 -05:00
CPunch 16bca39dae added simple timer system to CNShardServer 2020-08-24 16:11:40 -05:00
Onii-chan afbf309c7e
Add player revive, vehicle mount/dismount and more (#33) 2020-08-24 16:04:56 -05:00
CPunch 28ad1a0c25 fix windows support for sockets 2020-08-24 13:23:28 -05:00
JadeShrineMaiden ff5f3966e3
Sanity checks + Starting level changes (#31)
* Sanity checks + Starting level changes

- Item movement handler checks to make sure items aren't moved from equipment slot to equipment slot.
- Item give command checks to make sure an out of bounds item is not spawned (Below iType 0 or above iType 8)
- Players now begin at level 36, consequently the item give command does not level you up now.

* Sanity Check

- Prevents out of bounds item movement by comparing it to AINVEN_COUNT.
2020-08-24 03:07:51 -05:00
CPunch 55add82843
Merge pull request #32 from dongresource/work
-Wall, #pragma once, nanoSummonHandler() cleanup, verbosity levels
2020-08-23 16:57:58 -05:00
dongresource e99feb03d5 Add verbosity levels. 2020-08-23 23:09:31 +02:00
CPunch 8105d0aa88 properly handle socket errors in recieving packets 2020-08-23 15:09:51 -05:00
dongresource 756074cc62 Remove redundant initialization in nanoSummonHandler(). 2020-08-23 19:46:51 +02:00
dongresource 51a8cc8bdf Silence -Wall warnings. 2020-08-23 19:19:12 +02:00
dongresource 651ccba932 Replace ifdef guards with #pragma once
tl;dr this has potentially significant compilation speed benefits.
2020-08-23 19:14:54 +02:00
CPunch 561a809f33 load warps into memory in NPCManager::init 2020-08-23 11:26:25 -05:00
CPunch 0d27412d81 added getNearbyPlayers 2020-08-23 10:42:37 -05:00
Zenpock 1d792a21dd
Npc Warp implementation (#29)
* Update CNShardServer.hpp

* Update ChatManager.cpp

* Update ChatManager.hpp

* Update NPCManager.cpp

* Update NPCManager.hpp

* Add files via upload

* Update NPCManager.cpp

* Update NPCManager.cpp

* Update ChatManager.cpp

* Update ChatManager.cpp

* Update NPCManager.cpp

* Update NPCManager.cpp

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-23 10:32:25 -05:00
CPunch d6b96389be added sanity checks to nanos 2020-08-22 22:15:27 -05:00
dongresource 6129c0b4e2
Players can now see eachother's nanos. (#28) 2020-08-22 19:52:54 -05:00
CPunch 88953541ef added INITSTRUCT to zero-out data 2020-08-22 19:26:18 -05:00
CPunch 94b0dc724e major refactoring 2020-08-22 18:31:09 -05:00
CPunch 0ff1f74cd3 fixed inet_ntoa warnings 2020-08-22 14:02:58 -05:00
CPunch 35b424c531 fixed warnings for VC++ 2020-08-22 13:38:27 -05:00
Zenpock 4f10ee0505
MenuChat Added (#25)
* Update CNShardServer.hpp

* Update ChatManager.cpp

* Update ChatManager.hpp

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-22 13:11:47 -05:00
CPunch cd9fb6ec25 added sanity check to exitGame() 2020-08-22 13:08:37 -05:00
Onii-chan 56bf0db20d
Added more nano features (commands, equip & unequip, powers) (#26)
* Revert "fixed window build"

This reverts commit b94f602537.

* Revert "Revert "fixed window build""

This reverts commit dac4457ed2.

* Add nano power feature

* Update CNShardServer.hpp

* Update CNShardServer.hpp

* Test: Add nano power feature

Nano powers are set to the first power in its selection by default.

* Update NanoManager.cpp

* Test: More nano features

* Update NanoManager.hpp

* Update PlayerManager.hpp

* Update PlayerManager.cpp

* Updated indentations

* Update PlayerManager.cpp

* Add DEBUGLOG()

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-22 13:02:08 -05:00
dongresource 35c622d8a2 Add support for verbose logging. 2020-08-22 19:39:13 +02:00
dongresource 43f2def80b Report unhandled packets in string form. 2020-08-22 19:19:46 +02:00
dongresource 0ac600e223 Extracted all packet ids to a single, definitive enum.
It also contains other constant values that might be relevant at some
point.
2020-08-22 17:25:42 +02:00
FinnHornhoover 5f65a84b02
Fix unhandled exception in NPCManager (#24)
* fixed PROTOCOL_VERSION not being defined

* handle exceptions in NPCManager init
2020-08-22 01:46:52 -05:00
CPunch f71e1349c1 temp fix for U16toU8 edgecase 2020-08-21 22:11:04 -05:00
CPunch cff382a8ce sets a limit for sendData() 2020-08-21 21:32:22 -05:00
CPunch bbd6c5b532 moved header libraries 2020-08-21 21:03:12 -05:00
JadeShrineMaiden ab6df26f92
Disabled GM mode (#22)
Temporarily disabled, players can now use item commands without GM mode.
2020-08-21 19:38:10 -05:00
CPunch c5efbceca3 added sanity checks for sendPacket() 2020-08-21 19:33:42 -05:00
CPunch f289c72f6f populated NPCManager 2020-08-21 17:14:11 -05:00
JadeShrineMaiden caaffcbe3d
Item Deletion and extra fixes (#17)
* Deleting Items

* fixes

* fixes 2

* Basic GM login

* Update ItemManager.cpp

Co-authored-by: Raymonf <raymonf@outlook.com>
2020-08-21 15:09:52 -05:00
CPunch 3fe1a02200 include 0104 if PROTO_VERSION is undefined 2020-08-21 14:29:09 -05:00
CPunch cd19c54824 itemManager now uses a reference to the PlayerView 2020-08-21 14:28:14 -05:00
Raymonf 88d08ffca7
Fix MSVC compilation by not using non-standard struct initialization (#20)
Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
2020-08-21 14:17:06 -04:00
dongresource df18f3ccd1
PROTOCOL_VERSION, test items, MOTD fix (#18)
* Cleaned up protocol selection.

* cmake now works even if protocol option is omitted
* make now supports protocol selection
* removed PACKET_VERSION/CNPROTO_VERSION* redundancy
* ubuntu appveyor script has yet to be written
* cleaned up some trailing spaces

* Add some test items.

Ironically, this change is untested.

* [bugfix] Transmit MOTD when entering the game, not when loading screen fades.

This fixes unnecessary retransmission when /warping.
2020-08-21 12:38:45 -05:00
CPunch 1669ee3660 Merge branch 'master' of https://github.com/OpenFusionProject/OpenFusion 2020-08-21 00:31:09 -05:00
CPunch 5d0b30b4cb added AINVEN_COUT for 0728 2020-08-21 00:31:00 -05:00
Raymonf 0041da795a
Build multiple packet versions on AppVeyor for Windows (#14)
* Move to PowerShell script for Windows build

* Allow CMake to override struct version

* PACKET_VERSION option

* Rename CNPROTO_CUSTOM to CNPROTO_OVERRIDE

Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
2020-08-21 01:18:19 -04:00
CPunch eee1b52722 fixed ItemManager 2020-08-20 22:25:39 -05:00
JadeShrineMaiden aa2adcd9e2
Items Implementation (#11)
* Item Manager (Initial Implementation)

* Item Manager (Second Phase)

* Item Manager (Phase Three)

* Not Working Code

* Inventory Implementation (Complete?)

* Items Implementation

-Fixed Indentations
-Final touches to make it all work

* Update Makefile

* Added small comments

-- needs to be fixed
2020-08-20 21:10:14 -05:00