mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 22:51:30 +00:00
[Feature] Add Character:DefaultGuildRank Rule (#4438)
* [Feature] Add Character:DefaultGuildRank Rule * Update ruletypes.h * Update ruletypes.h * Update database.cpp
This commit is contained in:
parent
2937852cf9
commit
ac0f729aa2
@ -66,6 +66,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
|
#include "data_verification.h"
|
||||||
#include "eq_packet_structs.h"
|
#include "eq_packet_structs.h"
|
||||||
#include "extprofile.h"
|
#include "extprofile.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
@ -308,13 +309,15 @@ bool Database::ReserveName(uint32 account_id, const std::string& name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int guild_id = RuleI(Character, DefaultGuild);
|
const uint32 guild_id = RuleI(Character, DefaultGuild);
|
||||||
|
const uint8 guild_rank = EQ::Clamp(RuleI(Character, DefaultGuildRank), 0, 8);
|
||||||
if (guild_id != 0) {
|
if (guild_id != 0) {
|
||||||
if (e.id) {
|
if (e.id) {
|
||||||
auto g = GuildMembersRepository::NewEntity();
|
auto g = GuildMembersRepository::NewEntity();
|
||||||
|
|
||||||
g.char_id = e.id;
|
g.char_id = e.id;
|
||||||
g.guild_id = guild_id;
|
g.guild_id = guild_id;
|
||||||
|
g.rank_ = guild_rank;
|
||||||
|
|
||||||
GuildMembersRepository::InsertOne(*this, g);
|
GuildMembersRepository::InsertOne(*this, g);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -178,6 +178,7 @@ RULE_BOOL(Character, NoSkillsOnHorse, false, "Enabling this will prevent Bind Wo
|
|||||||
RULE_BOOL(Character, UseNoJunkFishing, false, "Disregards junk items when fishing")
|
RULE_BOOL(Character, UseNoJunkFishing, false, "Disregards junk items when fishing")
|
||||||
RULE_BOOL(Character, SoftDeletes, true, "When characters are deleted in character select, they are only soft deleted")
|
RULE_BOOL(Character, SoftDeletes, true, "When characters are deleted in character select, they are only soft deleted")
|
||||||
RULE_INT(Character, DefaultGuild, 0, "If not 0, new characters placed into the guild # indicated")
|
RULE_INT(Character, DefaultGuild, 0, "If not 0, new characters placed into the guild # indicated")
|
||||||
|
RULE_INT(Character, DefaultGuildRank, 8, "Default guild rank when Character:DefaultGuild is a non-0 value, default is 8 (Recruit)")
|
||||||
RULE_BOOL(Character, ProcessFearedProximity, false, "Processes proximity checks when feared")
|
RULE_BOOL(Character, ProcessFearedProximity, false, "Processes proximity checks when feared")
|
||||||
RULE_BOOL(Character, EnableCharacterEXPMods, false, "Enables character zone-based experience modifiers.")
|
RULE_BOOL(Character, EnableCharacterEXPMods, false, "Enables character zone-based experience modifiers.")
|
||||||
RULE_BOOL(Character, PVPEnableGuardFactionAssist, true, "Enables faction based assisting against the aggresor in pvp.")
|
RULE_BOOL(Character, PVPEnableGuardFactionAssist, true, "Enables faction based assisting against the aggresor in pvp.")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user