Back when this source was first released by @
SSkilly I thought it was awesome and that anyone wanting to make their own PServer should use this source. Until I realized it was missing a few things. So I went ahead and added some features that people probably want in their base:
- Portals
- Player teleporting
- Different chats (tell, guild, announce)
- Vault
- Realms
- Quests
- Guilds
- Loot system
- Trading
- Some extra commands
- Setpieces
- Potion consumption
- Music
- Some editor additions
- Small changes
A lot of the logic for these came from NR-Core, but I tried to keep the code style similar to what Skilly had done.
I did test this at multiple stages and asked people to try and find bugs, glitches, or just break the game. So all of this has been tested and confirmed working and bug/glitch free. That being said it's possible I missed something, but did not break anything in the original source.
Cheers. Have fun with a more up to date smooth af source
Edit: I Realized I forgot to add something back when removing something I was testing.
In Player.Inventory.cs DropItem
Replace
var item = Inventory[slot];
With
int item = Inventory[slot];
int data = ItemDatas[slot];
and replace
Inventory[slot] = -1;
with
Inventory[slot] = -1;
ItemDatas[slot] = -1;
and replace
container.Inventory[0] = item;
with
container.Inventory[0] = item;
container.ItemDatas[0] = data;
In Player.Inventory.cs SwapItem
Replace
//Invalid slot types
var item1 = con1.Inventory[slot1.SlotId];
var item2 = con2.Inventory[slot2.SlotId];
With
//Invalid slot types
int item1 = con1.Inventory[slot1.SlotId];
int data1 = con1.ItemDatas[slot1.SlotId];
int item2 = con2.Inventory[slot2.SlotId];
int data2 = con2.ItemDatas[slot2.SlotId];
and replace
con1.Inventory[slot1.SlotId] = item2;
con2.Inventory[slot2.SlotId] = item1;
with
con1.Inventory[slot1.SlotId] = item2;
con1.ItemDatas[slot1.SlotId] = data2;
con2.Inventory[slot2.SlotId] = item1;
con2.ItemDatas[slot2.SlotId] = data1;
Oopsie.