mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
State of Commit: Testable if you ask me (Akkadius) what you need to do
- Need to convert a list of functions and columns and should be ready to start intensive testing phase - All preliminary tests show things working great - All of player profile is saved and loaded from the database - DBAsync has been completely removed from all code - Removed zone/dbasync.cpp/.h - Removed common/dbasync.cpp/.h - Removed dbasync from cmake commmon and zone - Cleaned up a ton of functions - Added several tables to world CheckDatabaseConversions script: - `character_skills` - `character_languages` - `character_bind` - `character_alternate_abilities` - `character_currency` - `character_data` - `character_spells` - `character_memmed_spells` - `character_disciplines` - `character_material` - `character_tribute` - `character_bandolier` - `character_potionbelt` - Character select now loads from `character_data` - Character creation now creates to `character_data` - Updated function Database::UpdateName to use `character_data` - Updated function Database::CheckUsedName to use `character_data` - Updated function Database::MoveCharacterToZone to use `character_data` - Updated function Database::SetLoginFlags to use `character_data` - Updated function Database::SetFirstLogon to use `character_data` - Updated function Database::SetLFG to use `character_data` - Removed CopyCharacter functions and commands, to be recreated later since it never worked to begin with - Removed SharedDatabase::SetPlayerProfile - Trimmed down redundant case switch statements for World sendpackets to QueryServ - Added Character Methods to Database class: Loads: bool LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp); bool LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp); bool LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp); Saves: bool SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home); bool SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp); bool SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp); bool SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level); bool SaveCharacterSpellSwap(uint32 character_id, uint32 spell_id, uint32 from_slot, uint32 to_slot); bool SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id); bool SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id); bool SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color); bool SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value); bool SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value); bool SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id); bool SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp); bool SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name); bool SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon); Deletes: bool DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id); bool DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id); bool DeleteCharacterDisc(uint32 character_id, uint32 slot_id); bool DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
This commit is contained in:
+5
-27
@@ -225,7 +225,6 @@ int command_init(void) {
|
||||
command_add("worldshutdown","- Shut down world and all zones",200,command_worldshutdown) ||
|
||||
command_add("sendzonespawns","- Refresh spawn list for all clients in zone",150,command_sendzonespawns) ||
|
||||
command_add("dbspawn2","[spawngroup] [respawn] [variance] - Spawn an NPC from a predefined row in the spawn2 table",100,command_dbspawn2) ||
|
||||
command_add("copychar","[character name] [new character] [new account id] - Create a copy of a character",100,command_copychar) ||
|
||||
command_add("shutdown","- Shut this zone process down",150,command_shutdown) ||
|
||||
command_add("delacct","[accountname] - Delete an account",150,command_delacct) ||
|
||||
command_add("setpass","[accountname] [password] - Set local password for accountname",150,command_setpass) ||
|
||||
@@ -2227,28 +2226,6 @@ void command_dbspawn2(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void command_copychar(Client *c, const Seperator *sep)
|
||||
{
|
||||
if(sep->arg[1][0]==0 || sep->arg[2][0] == 0 || sep->arg[3][0] == 0)
|
||||
c->Message(0, "Usage: #copychar [character name] [new character] [new account id]");
|
||||
//CheckUsedName.... TRUE=No Char, FALSE=Char/Error
|
||||
//If there is no source...
|
||||
else if (database.CheckUsedName((char*)sep->arg[1])) {
|
||||
c->Message(0, "Source character not found!");
|
||||
}
|
||||
else {
|
||||
//If there is a name is not used....
|
||||
if (database.CheckUsedName((char*) sep->arg[2])) {
|
||||
if (!database.CopyCharacter((char*) sep->arg[1], (char*) sep->arg[2], atoi(sep->arg[3])))
|
||||
c->Message(0, "Character copy operation failed!");
|
||||
else
|
||||
c->Message(0, "Character copy complete.");
|
||||
}
|
||||
else
|
||||
c->Message(0, "Target character already exists!");
|
||||
}
|
||||
}
|
||||
|
||||
void command_shutdown(Client *c, const Seperator *sep)
|
||||
{
|
||||
CatchSignal(2);
|
||||
@@ -2423,8 +2400,8 @@ void command_showskills(Client *c, const Seperator *sep)
|
||||
|
||||
c->Message(0, "Skills for %s", t->GetName());
|
||||
for (SkillUseTypes i=Skill1HBlunt; i <= HIGHEST_SKILL; i=(SkillUseTypes)(i+1))
|
||||
c->Message(0, "Skill [%d] is at [%d]", i, t->GetSkill(i));
|
||||
}
|
||||
c->Message(0, "Skill [%d] is at [%d] - %u", i, t->GetSkill(i), t->GetRawSkill(i));
|
||||
}
|
||||
|
||||
void command_findspell(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -2801,7 +2778,7 @@ void command_charbackup(Client *c, const Seperator *sep)
|
||||
if (sep->IsNumber(2))
|
||||
charid = atoi(sep->arg[2]);
|
||||
else
|
||||
database.GetAccountIDByChar(sep->arg[2], &charid);
|
||||
database.GetAccountIDByChar(sep->arg[2]);
|
||||
if (charid) {
|
||||
if (database.RunQuery(query, MakeAnyLenString(&query,
|
||||
"Select id, backupreason, charid, account_id, zoneid, DATE_FORMAT(ts, '%%m/%%d/%%Y %%H:%%i:%%s') "
|
||||
@@ -2828,7 +2805,7 @@ void command_charbackup(Client *c, const Seperator *sep)
|
||||
if (sep->IsNumber(2))
|
||||
charid = atoi(sep->arg[2]);
|
||||
else
|
||||
database.GetAccountIDByChar(sep->arg[2], &charid);
|
||||
database.GetAccountIDByChar(sep->arg[2]);
|
||||
|
||||
if (charid && sep->IsNumber(3)) {
|
||||
uint32 cbid = atoi(sep->arg[3]);
|
||||
@@ -8725,6 +8702,7 @@ void command_traindisc(Client *c, const Seperator *sep)
|
||||
break; //continue the 1st loop
|
||||
} else if(t->GetPP().disciplines.values[r] == 0) {
|
||||
t->GetPP().disciplines.values[r] = curspell;
|
||||
database.SaveCharacterDisc(c->CharacterID(), r, curspell);
|
||||
t->SendDisciplineUpdate();
|
||||
t->Message(0, "You have learned a new discipline!");
|
||||
count++; //success counter
|
||||
|
||||
Reference in New Issue
Block a user