Skip to content

Commit d91de55

Browse files
committed
Fixed an issue where CharacterEquipment would fail to initialize Containers
Implemented proper handling for LoadingScreen Fixed an input issue with InputBox Fixed an issue where the blinking cursor for an InputBox would not reset internal state when the inputbox got focused Added ClearSlot to Bag Implemented Load Order for Map Loading (Terrain -> Terrain Models -> Models) Added New Commands (CreatureAdd, CreatureRemove, MapSync, MapSyncAll, GotoAdd, GotoAddHere, GotoRemove, GotoMap, GotoLocation, GotoXYZ) Improved information presented in NetworkedInfo View Fixed a crash in Inspector Implemented new PacketSystem Added NetworkUtil Simplified calculations for OrbitalCamera Added Support for Visual Items Changed to a ray based approach for target selection Added support for server transfering us to a different world Updated Submodule Engine
1 parent 5e6032a commit d91de55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2629
-1651
lines changed

Source/Game-Lib/Game-Lib/Application/Application.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ bool Application::Init()
326326
ServiceLocator::SetGameConsole(new GameConsole());
327327

328328
// Initialize Databases
329-
RefreshDatabases();
329+
DatabaseReload();
330330

331331
_luaManager = new Scripting::LuaManager();
332332
ServiceLocator::SetLuaManager(_luaManager);
@@ -389,7 +389,7 @@ bool Application::Tick(f32 deltaTime)
389389

390390
case MessageInbound::Type::RefreshDB:
391391
{
392-
ECS::Util::EventUtil::PushEvent(ECS::Components::RefreshDatabaseEvent {});
392+
ECS::Util::EventUtil::PushEvent(ECS::Components::DatabaseReloadEvent{});
393393
break;
394394
}
395395

@@ -400,9 +400,9 @@ bool Application::Tick(f32 deltaTime)
400400
}
401401
}
402402

403-
ECS::Util::EventUtil::OnEvent<ECS::Components::RefreshDatabaseEvent>([&]()
403+
ECS::Util::EventUtil::OnEvent<ECS::Components::DatabaseReloadEvent>([&]()
404404
{
405-
RefreshDatabases();
405+
DatabaseReload();
406406
});
407407

408408
_ecsScheduler->Update(_registries, deltaTime);
@@ -461,7 +461,7 @@ bool Application::Render(f32 deltaTime, f32& timeSpentWaiting)
461461
return true;
462462
}
463463

464-
void Application::RefreshDatabases()
464+
void Application::DatabaseReload()
465465
{
466466
ECSUtil::Icon::Refresh();
467467
ECSUtil::Camera::Refresh();

Source/Game-Lib/Game-Lib/Application/Application.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Application
5050
bool Init();
5151
bool Render(f32 deltaTime, f32& timeSpentWaiting);
5252

53-
void RefreshDatabases();
53+
void DatabaseReload();
5454
void SaveCDB();
5555

5656
void Cleanup();

Source/Game-Lib/Game-Lib/ECS/Components/AttachmentData.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace ECS
1111
{
1212
struct AttachmentInstance
1313
{
14+
public:
15+
u64 lastUpdatedFrame;
1416
entt::entity entity;
1517
mat4x4 matrix;
1618
};

Source/Game-Lib/Game-Lib/ECS/Components/Container.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ namespace ECS::Components
99
struct Container
1010
{
1111
public:
12-
GameDefine::ObjectGuid GetItem(u16 slotIndex) const
12+
ObjectGUID GetItem(u16 slotIndex) const
1313
{
1414
u16 numSlots = this->numSlots;
1515
#if defined(NC_DEBUG)
1616
NC_ASSERT(slotIndex < numSlots, "Container::GetItem - Called with slotIndex ({0}) when the container can only hold {1} items", slotIndex, numSlots);
1717
#endif
1818

1919
if (slotIndex >= numSlots)
20-
return GameDefine::ObjectGuid::Empty;
20+
return ObjectGUID::Empty;
2121

2222
return items[slotIndex];
2323
}
2424

25-
bool AddToSlot(u16 slotIndex, GameDefine::ObjectGuid item)
25+
bool AddToSlot(u16 slotIndex, ObjectGUID guid)
2626
{
2727
u16 numSlots = this->numSlots;
2828
#if defined(NC_DEBUG)
@@ -35,7 +35,7 @@ namespace ECS::Components
3535
if (!items[slotIndex].IsValid())
3636
--numFreeSlots;
3737

38-
items[slotIndex] = item;
38+
items[slotIndex] = guid;
3939
return true;
4040
}
4141

@@ -52,7 +52,7 @@ namespace ECS::Components
5252
if (items[slotIndex].IsValid())
5353
++numFreeSlots;
5454

55-
items[slotIndex] = GameDefine::ObjectGuid::Empty;
55+
items[slotIndex] = ObjectGUID::Empty;
5656
return true;
5757
}
5858

@@ -90,6 +90,6 @@ namespace ECS::Components
9090
u32 itemID = 0;
9191
u16 numSlots = 0;
9292
u16 numFreeSlots = 0;
93-
std::vector<GameDefine::ObjectGuid> items;
93+
std::vector<ObjectGUID> items;
9494
};
9595
}

Source/Game-Lib/Game-Lib/ECS/Components/Events.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace ECS::Components
55
{
66
struct DiscoveredModelsCompleteEvent {};
7-
struct RefreshDatabaseEvent {};
7+
struct DatabaseReloadEvent {};
88

99
struct MapLoadedEvent
1010
{

Source/Game-Lib/Game-Lib/ECS/Components/Item.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace ECS::Components
1010
struct Item
1111
{
1212
public:
13-
GameDefine::ObjectGuid guid = GameDefine::ObjectGuid::Empty;
13+
ObjectGUID guid = ObjectGUID::Empty;
1414
u32 itemID = std::numeric_limits<u32>::max();
1515
u16 count = 1;
1616
u16 durability = 0;

Source/Game-Lib/Game-Lib/ECS/Components/MovementInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace ECS::Components
66
{
77
struct MovementFlags
88
{
9+
public:
910
u32 forward : 1 = 0;
1011
u32 backward : 1 = 0;
1112
u32 left : 1 = 0;

Source/Game-Lib/Game-Lib/ECS/Components/ProximityTrigger.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#pragma once
22
#include <Base/Types.h>
33

4-
#include <Meta/Generated/Game/ProximityTriggerEnum.h>
5-
DECLARE_GENERIC_BITWISE_OPERATORS(Generated::ProximityTriggerFlagEnum);
4+
#include <Meta/Generated/Shared/ProximityTriggerEnum.h>
65

76
#include <entt/entt.hpp>
87
#include <set>

Source/Game-Lib/Game-Lib/ECS/Components/Unit.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ namespace ECS::Components
1212
struct Unit
1313
{
1414
public:
15-
GameDefine::ObjectGuid networkID;
15+
ObjectGUID networkID;
16+
std::string name;
17+
1618
entt::entity targetEntity;
1719
GameDefine::UnitClass unitClass;
1820
GameDefine::UnitRace race;

Source/Game-Lib/Game-Lib/ECS/Components/UnitEquipment.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ namespace ECS
1515
{
1616
public:
1717
std::array<u32, (u32)Database::Item::ItemEquipSlot::Count> equipmentSlotToItemID;
18-
robin_hood::unordered_set<Database::Item::ItemEquipSlot> dirtyEquipmentSlots;
18+
robin_hood::unordered_set<Database::Item::ItemEquipSlot> dirtyItemIDSlots;
19+
20+
std::array<u32, (u32)Database::Item::ItemEquipSlot::Count> equipmentSlotToVisualItemID;
21+
robin_hood::unordered_set<Database::Item::ItemEquipSlot> dirtyVisualItemIDSlots;
1922
};
2023

2124
struct UnitEquipmentDirty { };
25+
struct UnitVisualEquipmentDirty { };
2226
}
2327
}

0 commit comments

Comments
 (0)