mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
chore: update noninformative comments to be informative (#1407)
* better comments * more comments
This commit is contained in:
parent
e0ddbce8e7
commit
66cc582a9a
@ -629,7 +629,7 @@ enum class eGameMessageType : uint16_t {
|
|||||||
GET_INSTRUCTION_COUNT = 676,
|
GET_INSTRUCTION_COUNT = 676,
|
||||||
GET_IS_NPC = 677,
|
GET_IS_NPC = 677,
|
||||||
ACTIVATE_BUBBLE_BUFF = 678,
|
ACTIVATE_BUBBLE_BUFF = 678,
|
||||||
DECTIVATE_BUBBLE_BUFF = 679, // thanks netdevil
|
DECTIVATE_BUBBLE_BUFF = 679, // This is spelled wrong in the client, so we misspell it here.
|
||||||
EXHIBIT_VOTE = 680,
|
EXHIBIT_VOTE = 680,
|
||||||
ADD_PET_TO_PLAYER = 681,
|
ADD_PET_TO_PLAYER = 681,
|
||||||
REMOVE_PET_FROM_PLAYER = 682,
|
REMOVE_PET_FROM_PLAYER = 682,
|
||||||
|
@ -46,18 +46,20 @@ ActivityComponent::ActivityComponent(Entity* parent, int32_t activityID) : Compo
|
|||||||
auto* destroyableComponent = m_Parent->GetComponent<DestroyableComponent>();
|
auto* destroyableComponent = m_Parent->GetComponent<DestroyableComponent>();
|
||||||
|
|
||||||
if (destroyableComponent) {
|
if (destroyableComponent) {
|
||||||
// check for LMIs and set the loot LMIs
|
// First lookup the loot matrix id for this component id.
|
||||||
CDActivityRewardsTable* activityRewardsTable = CDClientManager::Instance().GetTable<CDActivityRewardsTable>();
|
CDActivityRewardsTable* activityRewardsTable = CDClientManager::Instance().GetTable<CDActivityRewardsTable>();
|
||||||
std::vector<CDActivityRewards> activityRewards = activityRewardsTable->Query([=](CDActivityRewards entry) {return (entry.LootMatrixIndex == destroyableComponent->GetLootMatrixID()); });
|
std::vector<CDActivityRewards> activityRewards = activityRewardsTable->Query([=](CDActivityRewards entry) {return (entry.LootMatrixIndex == destroyableComponent->GetLootMatrixID()); });
|
||||||
|
|
||||||
uint32_t startingLMI = 0;
|
uint32_t startingLMI = 0;
|
||||||
|
|
||||||
|
// If we have one, set the starting loot matrix id to that.
|
||||||
if (activityRewards.size() > 0) {
|
if (activityRewards.size() > 0) {
|
||||||
startingLMI = activityRewards[0].LootMatrixIndex;
|
startingLMI = activityRewards[0].LootMatrixIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startingLMI > 0) {
|
if (startingLMI > 0) {
|
||||||
// now time for bodge :)
|
// We may have more than 1 loot matrix index to use depending ont the size of the team that is looting the activity.
|
||||||
|
// So this logic will get the rest of the loot matrix indices for this activity.
|
||||||
|
|
||||||
std::vector<CDActivityRewards> objectTemplateActivities = activityRewardsTable->Query([=](CDActivityRewards entry) {return (activityRewards[0].objectTemplate == entry.objectTemplate); });
|
std::vector<CDActivityRewards> objectTemplateActivities = activityRewardsTable->Query([=](CDActivityRewards entry) {return (activityRewards[0].objectTemplate == entry.objectTemplate); });
|
||||||
for (const auto& item : objectTemplateActivities) {
|
for (const auto& item : objectTemplateActivities) {
|
||||||
|
@ -519,7 +519,7 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet
|
|||||||
{
|
{
|
||||||
item->SetCount(item->GetCount() - 1);
|
item->SetCount(item->GetCount() - 1);
|
||||||
|
|
||||||
LOG("BODGE TIME, YES IT GOES HERE");
|
LOG("DLU currently does not support breaking apart brick by brick models.");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -196,8 +196,8 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
|||||||
}
|
}
|
||||||
|
|
||||||
case eGameMessageType::MISSION_DIALOGUE_CANCELLED: {
|
case eGameMessageType::MISSION_DIALOGUE_CANCELLED: {
|
||||||
//This message is pointless for our implementation, as the client just carries on after
|
// This message is pointless for our implementation, as the client just carries on after
|
||||||
//rejecting a mission offer. We dont need to do anything. This is just here to remove a warning in our logs :)
|
// rejecting a mission offer. We dont need to do anything. This is just here to remove a warning in our logs :)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4627,7 +4627,7 @@ void GameMessages::HandleSetGhostReferencePosition(RakNet::BitStream* inStream,
|
|||||||
|
|
||||||
|
|
||||||
void GameMessages::HandleBuyFromVendor(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
void GameMessages::HandleBuyFromVendor(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
||||||
bool bConfirmed{}; // this doesnt even do anything, thanks ND!
|
bool bConfirmed{}; // This doesn't appear to do anything. Further research is needed.
|
||||||
bool countIsDefault{};
|
bool countIsDefault{};
|
||||||
int count = 1;
|
int count = 1;
|
||||||
LOT item;
|
LOT item;
|
||||||
|
@ -20,7 +20,7 @@ RawFile::RawFile(std::string fileName) {
|
|||||||
|
|
||||||
|
|
||||||
if (m_Version < 0x20) {
|
if (m_Version < 0x20) {
|
||||||
return; // Version too crusty to handle
|
return; // Version is too old to be supported
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read in chunks
|
// Read in chunks
|
||||||
|
@ -46,11 +46,7 @@ CppScripts::Script* ScriptComponent::GetScript() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScriptComponent::SetScript(const std::string& scriptName) {
|
void ScriptComponent::SetScript(const std::string& scriptName) {
|
||||||
//we don't need to delete the script because others may be using it :)
|
// Scripts are managed by the CppScripts class and are effecitvely singletons
|
||||||
/*if (m_Client) {
|
// and they may also be used by other script components so DON'T delete them.
|
||||||
m_Script = new InvalidScript();
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
m_Script = CppScripts::GetScript(m_Parent, scriptName);
|
m_Script = CppScripts::GetScript(m_Parent, scriptName);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user