mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Code Cleanup] Resharper Warnings (#2235)
* Remove unused local variable * Remove another unused variable * Correct typos and remove unused initialization * Cleanup some code in OPCharCreate * Remove unused function in client.cpp and undefined declaration. Also the function potentially had a null pointer dereference according to Visual Studio.
This commit is contained in:
+4
-16
@@ -1490,14 +1490,6 @@ void Client::TellClientZoneUnavailable() {
|
||||
autobootup_timeout.Disable();
|
||||
}
|
||||
|
||||
bool Client::GenPassKey(char* key) {
|
||||
char* passKey=nullptr;
|
||||
*passKey += ((char)('A'+((int)emu_random.Int(0, 25))));
|
||||
*passKey += ((char)('A'+((int)emu_random.Int(0, 25))));
|
||||
memcpy(key, passKey, strlen(passKey));
|
||||
return true;
|
||||
}
|
||||
|
||||
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req) {
|
||||
LogNetcode("Sending EQApplicationPacket OpCode {:#04x}", app->GetOpcode());
|
||||
|
||||
@@ -1571,7 +1563,6 @@ void Client::SendApproveWorld()
|
||||
bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
{
|
||||
PlayerProfile_Struct pp;
|
||||
ExtendedProfile_Struct ext;
|
||||
EQ::InventoryProfile inv;
|
||||
|
||||
pp.SetPlayerProfileVersion(EQ::versions::ConvertClientVersionToMobVersion(EQ::versions::ConvertClientVersionBitToClientVersion(m_ClientVersionBit)));
|
||||
@@ -1579,9 +1570,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
inv.SetGMInventory(false); // character cannot have gm flag at this point
|
||||
|
||||
time_t bday = time(nullptr);
|
||||
char startzone[50]={0};
|
||||
uint32 i;
|
||||
struct in_addr in;
|
||||
in_addr in;
|
||||
|
||||
int stats_sum = cc->STR + cc->STA + cc->AGI + cc->DEX + cc->WIS + cc->INT + cc->CHA;
|
||||
|
||||
@@ -1660,8 +1649,8 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
memset(pp.spell_book, 0xFF, (sizeof(uint32) * EQ::spells::SPELLBOOK_SIZE));
|
||||
memset(pp.mem_spells, 0xFF, (sizeof(uint32) * EQ::spells::SPELL_GEM_COUNT));
|
||||
|
||||
for(i = 0; i < BUFF_COUNT; i++)
|
||||
pp.buffs[i].spellid = 0xFFFF;
|
||||
for (auto& buff : pp.buffs)
|
||||
buff.spellid = 0xFFFF;
|
||||
|
||||
/* If server is PVP by default, make all character set to it. */
|
||||
pp.pvp = database.GetServerType() == 1 ? 1 : 0;
|
||||
@@ -1782,7 +1771,6 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 max_stats = 0;
|
||||
uint32 allocs = character_create_allocations.size();
|
||||
RaceClassAllocation allocation = {0};
|
||||
found = false;
|
||||
@@ -1799,7 +1787,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
return false;
|
||||
}
|
||||
|
||||
max_stats = allocation.DefaultPointAllocation[0] +
|
||||
uint32 max_stats = allocation.DefaultPointAllocation[0] +
|
||||
allocation.DefaultPointAllocation[1] +
|
||||
allocation.DefaultPointAllocation[2] +
|
||||
allocation.DefaultPointAllocation[3] +
|
||||
|
||||
Reference in New Issue
Block a user