Added spell links to interrupt and fizzle messages

This commit is contained in:
dannuic
2026-04-19 23:07:02 -06:00
parent af06fb703c
commit 0e0162edc0
5 changed files with 53 additions and 10 deletions
+2
View File
@@ -734,6 +734,8 @@ set(common_headers
util/uuid.h
version.h
zone_store.h
links.h
links.cpp
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${common_sources})
+10
View File
@@ -0,0 +1,10 @@
//
// Created by dannu on 4/18/2026.
//
#include "links.h"
std::string Links::FormatSpellLink(uint32_t SpellID, const std::string& SpellName)
{
return fmt::format("{}63^{}^0^'{}{}", ITEM_TAG_CHAR, SpellID, SpellName.c_str(), ITEM_TAG_CHAR);
}
+11
View File
@@ -0,0 +1,11 @@
//
// Created by dannu on 4/18/2026.
//
#pragma once
namespace Links
{
constexpr char ITEM_TAG_CHAR = '\x12';
std::string FormatSpellLink(uint32_t SpellID, const std::string& SpellName);
}
+2 -2
View File
@@ -364,7 +364,6 @@ namespace TOB
//OUT(inventoryslot);
OUT(target_id);
LogNetcode("S->C OP_CastSpell {}", DumpPacketToString(__packet));
FINISH_ENCODE();
}
@@ -3652,7 +3651,6 @@ namespace TOB
IN(y_pos);
IN(x_pos);
IN(z_pos);
LogNetcode("C->S OP_CastSpell {}", DumpPacketToString(__packet));
FINISH_DIRECT_DECODE();
}
@@ -4864,7 +4862,9 @@ namespace TOB
}
default:
//unsupported etag right now; just pass it as is
message_out.push_back('\x12');
message_out.append(segments[segment_iter]);
message_out.push_back('\x12');
break;
}
}