Core/Spells: Implemented multiple spell power costs

This commit is contained in:
Shauren
2015-03-08 13:31:57 +01:00
parent 9ffeb58d09
commit 0ba2e0d5ee
30 changed files with 537 additions and 421 deletions

View File

@@ -19,14 +19,14 @@
#include "ARC4.h"
#include <openssl/sha.h>
ARC4::ARC4(uint8 len) : m_ctx()
ARC4::ARC4(uint32 len) : m_ctx()
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
}
ARC4::ARC4(uint8 *seed, uint8 len) : m_ctx()
ARC4::ARC4(uint8 *seed, uint32 len) : m_ctx()
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);

View File

@@ -25,8 +25,8 @@
class ARC4
{
public:
ARC4(uint8 len);
ARC4(uint8 *seed, uint8 len);
ARC4(uint32 len);
ARC4(uint8 *seed, uint32 len);
~ARC4();
void Init(uint8 *seed);
void UpdateData(int len, uint8 *data);