-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
254dc7c
commit 5ed7fbb
Showing
26 changed files
with
1,638 additions
and
1,104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1 @@ | ||
local LoginEvent = CreatureEvent("DiscordHook") | ||
|
||
--Discord webhook enums | ||
--MESSAGE_NORMAL | ||
--MESSAGE_ERROR; | ||
--MESSAGE_LOG; | ||
--MESSAGE_INFO; | ||
|
||
local webhookLink = "TOKEN HERE" | ||
|
||
function LoginEvent.onLogin(player) | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_INFO, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_ERROR, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_NORMAL, "Player: " .. player:getName() .. " has logged in") | ||
Game.sendDiscordMessage(webhookLink, MESSAGE_LOG, "Player: " .. player:getName() .. " has logged in") | ||
return true | ||
end | ||
|
||
LoginEvent:type("login") | ||
LoginEvent:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Credits: BlackTek Server Creator [email protected]. | ||
// This project is based of otland's The Forgottenserver. | ||
// Any and all code taken from otland's The Forgottenserver is licensed under GPL 2.0 | ||
// Any code Authored by: Codinablack or BlackTek contributers, that is not already licensed, is hereby licesned MIT. | ||
// The GPL 2.0 License that can be found in the LICENSE file. | ||
// All code found in this file is licensed under MIT and can be found in the LICENSE file. | ||
|
||
|
||
#include "augment.h" | ||
|
||
Augment::Augment(std::string_view name) : m_name(name), m_mod_list(std::make_shared<ModifierList>()) { | ||
m_mod_list->initializeSharedPointer(); | ||
} | ||
|
||
Augment::Augment(std::shared_ptr<Augment>& original) : m_name(original->m_name), m_mod_list(original->m_mod_list) { | ||
m_mod_list->initializeSharedPointer(); | ||
} | ||
|
||
inline std::shared_ptr<Augment> Augment::MakeAugment(std::string_view augmentName) { | ||
auto augment = std::make_shared<Augment>(augmentName); | ||
return augment; | ||
} | ||
|
||
inline std::shared_ptr<Augment> Augment::MakeAugment(std::shared_ptr<Augment>& originalRef) | ||
{ | ||
auto augmentClone = std::make_shared<Augment>(originalRef); | ||
return augmentClone; | ||
} | ||
|
||
inline const std::string_view Augment::getName() const { | ||
return m_name; | ||
} | ||
|
||
inline void Augment::addModifier(std::shared_ptr<DamageModifier> modifier) { | ||
m_mod_list->addModifier(modifier); | ||
} | ||
|
||
inline void Augment::removeModifier(std::shared_ptr<DamageModifier>& modifier) { | ||
m_mod_list->removeModifier(modifier); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getAttackModifiers(uint8_t modType) | ||
{ | ||
return m_mod_list->getAttackModifiers(modType); | ||
} | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& Augment::getDefenseModifiers(uint8_t modType) | ||
{ | ||
return m_mod_list->getDefenseModifiers(modType); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Credits: BlackTek Server Creator [email protected]. | ||
// This project is based of otland's The Forgottenserver. | ||
// Any and all code taken from otland's The Forgottenserver is licensed under GPL 2.0 | ||
// Any code Authored by: Codinablack or BlackTek contributers, that is not already licensed, is hereby licesned MIT. | ||
// The GPL 2.0 License that can be found in the LICENSE file. | ||
// All code found in this file is licensed under MIT and can be found in the LICENSE file. | ||
|
||
|
||
#ifndef FS_AUGMENT_H | ||
#define FS_AUGMENT_H | ||
|
||
#include "damagemodifier.h" | ||
|
||
class Augment : public std::enable_shared_from_this<Augment> { | ||
|
||
public: | ||
Augment() = default; | ||
Augment(std::string_view name); | ||
Augment(std::shared_ptr<Augment>& original); | ||
|
||
~Augment() = default; | ||
|
||
// allow copying | ||
explicit Augment(const Augment&) = default; | ||
Augment& operator=(const Augment&) = default; | ||
|
||
const std::string_view getName() const; | ||
static std::shared_ptr<Augment> MakeAugment(std::string_view augmentName); | ||
static std::shared_ptr<Augment> MakeAugment(std::shared_ptr<Augment>& originalPointer); | ||
|
||
void addModifier(std::shared_ptr<DamageModifier> modifier); | ||
void removeModifier(std::shared_ptr<DamageModifier>& modifier); | ||
|
||
std::vector<std::shared_ptr<DamageModifier>>& getAttackModifiers(uint8_t modType); | ||
std::vector<std::shared_ptr<DamageModifier>>& getDefenseModifiers(uint8_t modType); | ||
|
||
private: | ||
|
||
std::shared_ptr<ModifierList> m_mod_list; | ||
std::string_view m_name; | ||
}; | ||
|
||
|
||
#endif |
Oops, something went wrong.