Skip to content

Commit

Permalink
Merge branch 'liyunfan1223:Playerbot' into Playerbot
Browse files Browse the repository at this point in the history
  • Loading branch information
atidot3 authored Aug 3, 2024
2 parents 0406652 + f5e44cd commit 2cde786
Show file tree
Hide file tree
Showing 252 changed files with 4,248 additions and 5,516 deletions.
16 changes: 8 additions & 8 deletions apps/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG TZ=Etc/UTC

# This target lays out the general directory skeleton for AzerothCore,
# This target isn't intended to be directly used
FROM ubuntu:$UBUNTU_VERSION as skeleton
FROM ubuntu:$UBUNTU_VERSION AS skeleton

ARG DOCKER=1
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -39,7 +39,7 @@ WORKDIR /azerothcore

# This target builds the docker image
# This target can be useful to inspect the explicit outputs from the build,
FROM skeleton as build
FROM skeleton AS build

ARG CTOOLS_BUILD="all"
ARG CTYPE="RelWithDebInfo"
Expand Down Expand Up @@ -106,7 +106,7 @@ RUN --mount=type=cache,target=/ccache,sharing=locked \
# Base runtime for services #
#############################

FROM skeleton as runtime
FROM skeleton AS runtime

ARG USER_ID=1000
ARG GROUP_ID=1000
Expand Down Expand Up @@ -144,7 +144,7 @@ ENTRYPOINT ["/usr/bin/env", "bash", "/azerothcore/entrypoint.sh"]
# Auth Server #
###############

FROM runtime as authserver
FROM runtime AS authserver
LABEL description "AzerothCore Auth Server"

ENV ACORE_COMPONENT=authserver
Expand All @@ -165,7 +165,7 @@ CMD ["authserver"]
# World Server #
################

FROM runtime as worldserver
FROM runtime AS worldserver

LABEL description "AzerothCore World Server"

Expand All @@ -188,7 +188,7 @@ CMD ["worldserver"]
# DB Import #
#############

FROM runtime as db-import
FROM runtime AS db-import

LABEL description "AzerothCore Database Import tool"

Expand All @@ -209,7 +209,7 @@ CMD /azerothcore/env/dist/bin/dbimport
# Client Data #
###############

FROM skeleton as client-data
FROM skeleton AS client-data

LABEL description="AzerothCore client-data"

Expand All @@ -231,7 +231,7 @@ CMD bash -c "source /azerothcore/apps/installer/includes/functions.sh && inst_do
# Map Extractors #
##################

FROM runtime as tools
FROM runtime AS tools

LABEL description "AzerothCore Tools"

Expand Down
9 changes: 9 additions & 0 deletions data/sql/updates/db_world/2024_07_26_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- DB update 22024_07_26_00 -> 2024_07_26_01
DELETE FROM `command` WHERE `name`='account set email';

INSERT INTO `command` (`name`, `security`, `help`) VALUES
('account set email', 4, 'Syntax: .account set email $account $email $email_confirmation\nAdd or change an email to the account.');

DELETE FROM `acore_string` WHERE `entry` IN (875);
INSERT INTO `acore_string` (`entry`, `content_default`,`locale_zhCN`) VALUES
(875, 'Your email can\'t be longer than 255 characters, email not changed!', '您的电子邮件无法超过255个字符,电子邮件没有改变!');
44 changes: 44 additions & 0 deletions data/sql/updates/db_world/2024_07_29_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
-- DB update 2024_07_28_00 -> 2024_07_29_00
--
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg_aura' WHERE `spell_id`=71340 AND `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_frenzied_bloodthirst_aura' WHERE `spell_id` IN (70877,71474) AND `ScriptName`='spell_blood_queen_frenzied_bloodthirst';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_essence_of_the_blood_queen_aura' WHERE `spell_id`=70871 AND `ScriptName`='spell_blood_queen_essence_of_the_blood_queen';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_stoneform_aura' WHERE `spell_id`=70733 AND `ScriptName`='spell_icc_stoneform';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_web_wrap_aura' WHERE `spell_id`=70980 AND `ScriptName`='spell_icc_web_wrap';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_dark_reckoning_aura' WHERE `spell_id`=69483 AND `ScriptName`='spell_icc_dark_reckoning';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_yf_frozen_orb_aura' WHERE `spell_id`=71274 AND `ScriptName`='spell_icc_yf_frozen_orb';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_yh_volley_aura' WHERE `spell_id`=71252 AND `ScriptName`='spell_icc_yh_volley';
UPDATE `spell_script_names` SET `ScriptName`='spell_festergut_blighted_spores_aura' WHERE `spell_id` IN (69290,71222,73033,73034) AND `ScriptName`='spell_festergut_blighted_spores';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_nightmare_cloud_aura' WHERE `spell_id`=71970 AND `ScriptName`='spell_dreamwalker_nightmare_cloud';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_mana_void_aura' WHERE `spell_id`=71085 AND `ScriptName`='spell_dreamwalker_mana_void';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_decay_periodic_timer_aura' WHERE `spell_id` IN (70912,70913,70915,70916) AND `ScriptName`='spell_dreamwalker_decay_periodic_timer';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_summon_suppresser_aura' WHERE `spell_id`=70912 AND `ScriptName`='spell_dreamwalker_summon_suppresser';
UPDATE `spell_script_names` SET `ScriptName`='spell_valithria_suppression_aura' WHERE `spell_id`=70588 AND `ScriptName`='spell_valithria_suppression';
UPDATE `spell_script_names` SET `ScriptName`='spell_deathwhisper_mana_barrier_aura' WHERE `spell_id`=70842 AND `ScriptName`='spell_deathwhisper_mana_barrier';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_grow_stacker_aura' WHERE `spell_id`=70345 AND `ScriptName`='spell_putricide_grow_stacker';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_gaseous_bloat_aura' WHERE `spell_id` IN (70672,72455,72832,72833) AND `ScriptName`='spell_putricide_gaseous_bloat';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_mutated_plague_aura' WHERE `spell_id` IN (72451,72463,72671,72672) AND `ScriptName`='spell_putricide_mutated_plague';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_unbound_plague_dmg_aura' WHERE `spell_id` IN (70911,72854,72855,72856) AND `ScriptName`='spell_putricide_unbound_plague_dmg';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_mutated_transformation_dismiss_aura' WHERE `spell_id` IN (70405,72508,72509,72510) AND `ScriptName`='spell_putricide_mutated_transformation_dismiss';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_permeating_chill_aura' WHERE `spell_id`=70107 AND `ScriptName`='spell_sindragosa_permeating_chill';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_instability_aura' WHERE `spell_id`=69766 AND `ScriptName`='spell_sindragosa_instability';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_frost_beacon_aura' WHERE `spell_id`=70126 AND `ScriptName`='spell_sindragosa_frost_beacon';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_soul_preservation_aura' WHERE `spell_id`=72465 AND `ScriptName`='spell_sindragosa_soul_preservation';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_infest_aura' WHERE `spell_id` IN (70541,73779,73780,73781) AND `ScriptName`='spell_the_lich_king_infest';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_necrotic_plague_aura' WHERE `spell_id` IN (70337,73912,73913,73914) AND `ScriptName`='spell_the_lich_king_necrotic_plague';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_shadow_trap_visual_aura' WHERE `spell_id`=73530 AND `ScriptName`='spell_the_lich_king_shadow_trap_visual';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_soul_reaper_aura' WHERE `spell_id` IN (69409,73797,73798,73799) AND `ScriptName`='spell_the_lich_king_soul_reaper';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_vile_spirits_aura' WHERE `spell_id`=70498 AND `ScriptName`='spell_the_lich_king_vile_spirits';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_harvest_soul_aura' WHERE `spell_id` IN (68980,74296,74297,74325) AND `ScriptName`='spell_the_lich_king_harvest_soul';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_lights_favor_aura' WHERE `spell_id`=69382 AND `ScriptName`='spell_the_lich_king_lights_favor';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_dark_hunger_aura' WHERE `spell_id`=69383 AND `ScriptName`='spell_the_lich_king_dark_hunger';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_soul_rip_aura' WHERE `spell_id`=69397 AND `ScriptName`='spell_the_lich_king_soul_rip';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_rocket_pack_aura' WHERE `spell_id`=68721 AND `ScriptName`='spell_igb_rocket_pack';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_rocket_pack_useable_aura' WHERE `spell_id`=70348 AND `ScriptName`='spell_igb_rocket_pack_useable';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_explosion_main_aura' WHERE `spell_id` IN (72134,72137) AND `ScriptName`='spell_igb_explosion_main';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_periodic_trigger_with_power_cost_aura' WHERE `spell_id` IN (69470,69487) AND `ScriptName`='spell_igb_periodic_trigger_with_power_cost';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_overheat_aura' WHERE `spell_id`=69487 AND `ScriptName`='spell_igb_overheat';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_on_gunship_deck_aura' WHERE `spell_id` IN (70120,70121) AND `ScriptName`='spell_igb_on_gunship_deck';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_council_shadow_prison_aura' WHERE `spell_id`=73001 AND `ScriptName`='spell_blood_council_shadow_prison';
UPDATE `spell_script_names` SET `ScriptName`='spell_valanar_kinetic_bomb_absorb_aura' WHERE `spell_id`=72054 AND `ScriptName`='spell_valanar_kinetic_bomb_absorb';
UPDATE `spell_script_names` SET `ScriptName`='spell_rotface_unstable_ooze_explosion_suicide_aura' WHERE `spell_id`=71441 AND `ScriptName`='spell_rotface_unstable_ooze_explosion_suicide';
3 changes: 3 additions & 0 deletions data/sql/updates/db_world/2024_07_29_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- DB update 2024_07_29_00 -> 2024_07_29_01
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE (`entry` = 22947);
4 changes: 4 additions & 0 deletions data/sql/updates/db_world/2024_07_30_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- DB update 2024_07_29_01 -> 2024_07_30_00
-- Wing Buffet
DELETE FROM `spell_custom_attr` WHERE `spell_id`=37319;
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (37319, 4);
5 changes: 5 additions & 0 deletions data/sql/updates/db_world/2024_07_30_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- DB update 2024_07_30_00 -> 2024_07_30_01
--
DELETE FROM `spell_proc_event` WHERE `entry` = 40484;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(40484, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 0);
3 changes: 3 additions & 0 deletions data/sql/updates/db_world/2024_07_30_02.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- DB update 2024_07_30_01 -> 2024_07_30_02
--
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`&~33554432 WHERE `entry` = 23419;
2 changes: 2 additions & 0 deletions data/sql/updates/db_world/2024_07_31_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- DB update 2024_07_30_02 -> 2024_07_31_00
UPDATE `game_event` SET `start_time`='2008-07-31 12:00:00', `end_time`='2008-08-05 12:00:00', `occurence` = 60, `description` = 'L70ETC BlizzCon Concert' WHERE `eventEntry` = 32;
2 changes: 0 additions & 2 deletions src/common/Asio/AsioHacksFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef AsioHacksFwd_h__
#define AsioHacksFwd_h__

#include <boost/version.hpp>

/**
Collection of forward declarations to improve compile time
*/
Expand Down
1 change: 0 additions & 1 deletion src/common/Asio/Resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef Resolver_h__
#define Resolver_h__

#include "IoContext.h"
#include "Optional.h"
#include <boost/asio/ip/tcp.hpp>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/common/Collision/DynamicTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace

template<> struct HashTrait< GameObjectModel>
{
static size_t hashCode(const GameObjectModel& g) { return (size_t)(void*)&g; }
static std::size_t hashCode(const GameObjectModel& g) { return (size_t)(void*)&g; }
};

template<> struct PositionTrait< GameObjectModel>
Expand Down
3 changes: 0 additions & 3 deletions src/common/Collision/Management/IMMAPMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#ifndef _IMMAPMANAGER_H
#define _IMMAPMANAGER_H

#include "Define.h"
#include <string>

// Interface for IMMapManger
namespace MMAP
{
Expand Down
2 changes: 0 additions & 2 deletions src/common/Collision/Management/MMapFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include "MMapFactory.h"
#include <cstring>
#include <set>

namespace MMAP
{
// ######################## MMapFactory ########################
Expand Down
4 changes: 0 additions & 4 deletions src/common/Collision/Management/MMapFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
#ifndef _MMAP_FACTORY_H
#define _MMAP_FACTORY_H

#include "DetourAlloc.h"
#include "DetourExtended.h"
#include "DetourNavMesh.h"
#include "MMapMgr.h"
#include <unordered_map>

namespace MMAP
{
Expand Down
2 changes: 1 addition & 1 deletion src/common/Collision/Management/MMapMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace MMAP
unsigned char* data = (unsigned char*)dtAlloc(fileHeader.size, DT_ALLOC_PERM);
ASSERT(data);

size_t result = fread(data, fileHeader.size, 1, file);
std::size_t result = fread(data, fileHeader.size, 1, file);
if (!result)
{
LOG_ERROR("maps", "MMAP:loadMap: Bad header or data in mmap {:03}{:02}{:02}.mmtile", mapId, x, y);
Expand Down
3 changes: 1 addition & 2 deletions src/common/Collision/Management/MMapMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
#include "DetourAlloc.h"
#include "DetourExtended.h"
#include "DetourNavMesh.h"
#include <shared_mutex>
#include <unordered_map>
#include <vector>

// memory management
inline void* dtCustomAlloc(size_t size, dtAllocHint /*hint*/)
inline void* dtCustomAlloc(std::size_t size, dtAllocHint /*hint*/)
{
return (void*)new unsigned char[size];
}
Expand Down
2 changes: 0 additions & 2 deletions src/common/Collision/Management/VMapFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef _VMAPFACTORY_H
#define _VMAPFACTORY_H

#include "IVMapMgr.h"

// This is the access point to the VMapMgr.
namespace VMAP
{
Expand Down
1 change: 0 additions & 1 deletion src/common/Collision/Management/VMapMgr2.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef _VMAPMANAGER2_H
#define _VMAPMANAGER2_H

#include "Common.h"
#include "IVMapMgr.h"
#include <mutex>
#include <unordered_map>
Expand Down
1 change: 0 additions & 1 deletion src/common/Collision/Models/WorldModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "BoundingIntervalHierarchy.h"
#include "Define.h"
#include <G3D/AABox.h>
#include <G3D/HashTrait.h>
#include <G3D/Ray.h>
#include <G3D/Vector3.h>

Expand Down
1 change: 0 additions & 1 deletion src/common/Collision/RegularGrid.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef _REGULAR_GRID_H
#define _REGULAR_GRID_H

#include <G3D/BoundsTrait.h>
#include <G3D/PositionTrait.h>
#include <G3D/Ray.h>
#include <G3D/Table.h>
Expand Down
1 change: 0 additions & 1 deletion src/common/Collision/VMapDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#ifndef _VMAPDEFINITIONS_H
#define _VMAPDEFINITIONS_H
#include <cstring>

#define LIQUID_TILE_SIZE (533.333f / 128.f)

Expand Down
1 change: 0 additions & 1 deletion src/common/Collision/VMapTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef _VMAPTOOLS_H
#define _VMAPTOOLS_H

#include "Define.h"
#include <G3D/AABox.h>
#include <G3D/CollisionDetection.h>

Expand Down
3 changes: 0 additions & 3 deletions src/common/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
#define AZEROTHCORE_COMMON_H

#include "Define.h"
#include <array>
#include <memory>
#include <string>
#include <utility>

#if AC_PLATFORM == AC_PLATFORM_WINDOWS
#include <ws2tcpip.h>
Expand Down
14 changes: 7 additions & 7 deletions src/common/Configuration/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ namespace
// Check system configs like *server.conf*
bool IsAppConfig(std::string_view fileName)
{
size_t foundAuth = fileName.find("authserver.conf");
size_t foundWorld = fileName.find("worldserver.conf");
size_t foundImport = fileName.find("dbimport.conf");
std::size_t foundAuth = fileName.find("authserver.conf");
std::size_t foundWorld = fileName.find("worldserver.conf");
std::size_t foundImport = fileName.find("dbimport.conf");

return foundAuth != std::string_view::npos || foundWorld != std::string_view::npos || foundImport != std::string_view::npos;
}

// Check logging system configs like Appender.* and Logger.*
bool IsLoggingSystemOptions(std::string_view optionName)
{
size_t foundAppender = optionName.find("Appender.");
size_t foundLogger = optionName.find("Logger.");
std::size_t foundAppender = optionName.find("Appender.");
std::size_t foundLogger = optionName.find("Logger.");

return foundAppender != std::string_view::npos || foundLogger != std::string_view::npos;
}
Expand Down Expand Up @@ -223,15 +223,15 @@ namespace
std::string result;

const char* str = key.c_str();
size_t n = key.length();
std::size_t n = key.length();

char curr;
bool isEnd;
bool nextIsUpper;
bool currIsNumeric;
bool nextIsNumeric;

for (size_t i = 0; i < n; ++i)
for (std::size_t i = 0; i < n; ++i)
{
curr = str[i];
if (curr == ' ' || curr == '.' || curr == '-')
Expand Down
1 change: 0 additions & 1 deletion src/common/Configuration/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef CONFIG_H
#define CONFIG_H

#include "Define.h"
#include <stdexcept>
#include <string_view>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/common/Cryptography/AES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void Acore::Crypto::AES::Init(Key const& key)
ASSERT(status);
}

bool Acore::Crypto::AES::Process(IV const& iv, uint8* data, size_t length, Tag& tag)
bool Acore::Crypto::AES::Process(IV const& iv, uint8* data, std::size_t length, Tag& tag)
{
ASSERT(length <= static_cast<size_t>(std::numeric_limits<int>::max()));
int len = static_cast<int>(length);
Expand Down
8 changes: 4 additions & 4 deletions src/common/Cryptography/AES.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ namespace Acore::Crypto
class AC_COMMON_API AES
{
public:
static constexpr size_t IV_SIZE_BYTES = 12;
static constexpr size_t KEY_SIZE_BYTES = 16;
static constexpr size_t TAG_SIZE_BYTES = 12;
static constexpr std::size_t IV_SIZE_BYTES = 12;
static constexpr std::size_t KEY_SIZE_BYTES = 16;
static constexpr std::size_t TAG_SIZE_BYTES = 12;

using IV = std::array<uint8, IV_SIZE_BYTES>;
using Key = std::array<uint8, KEY_SIZE_BYTES>;
Expand All @@ -40,7 +40,7 @@ namespace Acore::Crypto

void Init(Key const& key);

bool Process(IV const& iv, uint8* data, size_t length, Tag& tag);
bool Process(IV const& iv, uint8* data, std::size_t length, Tag& tag);

private:
EVP_CIPHER_CTX* _ctx;
Expand Down
4 changes: 2 additions & 2 deletions src/common/Cryptography/ARC4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ Acore::Crypto::ARC4::~ARC4()
#endif
}

void Acore::Crypto::ARC4::Init(uint8 const* seed, size_t len)
void Acore::Crypto::ARC4::Init(uint8 const* seed, std::size_t len)
{
int result1 = EVP_CIPHER_CTX_set_key_length(_ctx, len);
ASSERT(result1 == 1);
int result2 = EVP_EncryptInit_ex(_ctx, nullptr, nullptr, seed, nullptr);
ASSERT(result2 == 1);
}

void Acore::Crypto::ARC4::UpdateData(uint8* data, size_t len)
void Acore::Crypto::ARC4::UpdateData(uint8* data, std::size_t len)
{
int outlen = 0;
int result1 = EVP_EncryptUpdate(_ctx, data, &outlen, data, len);
Expand Down
Loading

0 comments on commit 2cde786

Please sign in to comment.