mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Remove trailing whitespace
This commit is contained in:
+36
-36
@@ -4,13 +4,13 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
@@ -77,7 +77,7 @@ void Petition::SendPetitionToPlayer(Client* clientto) {
|
||||
return;
|
||||
}
|
||||
|
||||
Petition::Petition(uint32 id)
|
||||
Petition::Petition(uint32 id)
|
||||
{
|
||||
petid = id;
|
||||
charclass = 0;
|
||||
@@ -93,56 +93,56 @@ Petition::Petition(uint32 id)
|
||||
memset(lastgm, 0, sizeof(lastgm));
|
||||
memset(petitiontext, 0, sizeof(petitiontext));
|
||||
memset(gmtext, 0, sizeof(gmtext));
|
||||
|
||||
|
||||
//memset(this->zone, 0, sizeof(this->zone));
|
||||
zone = 1;
|
||||
}
|
||||
Petition* PetitionList::GetPetitionByID(uint32 id_in) {
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (iterator.GetData()->GetID() == id_in)
|
||||
Petition* PetitionList::GetPetitionByID(uint32 id_in) {
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (iterator.GetData()->GetID() == id_in)
|
||||
return iterator.GetData();
|
||||
iterator.Advance();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint32 PetitionList::GetTotalPetitions(){
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
iterator.Reset();
|
||||
uint32 total=0;
|
||||
while(iterator.MoreElements()) {
|
||||
while(iterator.MoreElements()) {
|
||||
total++;
|
||||
iterator.Advance();
|
||||
iterator.Advance();
|
||||
}
|
||||
return total;
|
||||
return total;
|
||||
}
|
||||
bool PetitionList::FindPetitionByAccountName(const char* acctname) {
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (!strcmp(acctname,iterator.GetData()->GetAccountName()))
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (!strcmp(acctname,iterator.GetData()->GetAccountName()))
|
||||
return true;
|
||||
iterator.Advance();
|
||||
}
|
||||
return false;
|
||||
iterator.Advance();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool PetitionList::DeletePetitionByCharName(const char* charname) {
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
LinkedListIterator<Petition*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (!strcmp(charname,iterator.GetData()->GetCharName())) {
|
||||
if(DeletePetition(iterator.GetData()->GetID())==0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
return false;
|
||||
iterator.Advance();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void PetitionList::UpdateZoneListQueue() {
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_Petition, sizeof(ServerPetitionUpdate_Struct));
|
||||
@@ -228,7 +228,7 @@ void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in DeletePetitionFromDB query '%s': %s", query, errbuf);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ void ZoneDatabase::InsertPetitionToDB(Petition* wpet)
|
||||
checkedout = 1;
|
||||
else
|
||||
checkedout = 0;
|
||||
|
||||
|
||||
uint32 len = strlen(wpet->GetPetitionText());
|
||||
char* petitiontext = new char[2*len+1];
|
||||
memset(petitiontext, 0, 2*len+1);
|
||||
@@ -266,7 +266,7 @@ void ZoneDatabase::InsertPetitionToDB(Petition* wpet)
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO petitions (petid, charname, accountname, lastgm, petitiontext, zone, urgency, charclass, charrace, charlevel, checkouts, unavailables, ischeckedout, senttime, gmtext) values (%i,'%s','%s','%s','%s',%i,%i,%i,%i,%i,%i,%i,%i,%i, '%s')", wpet->GetID(), wpet->GetCharName(), wpet->GetAccountName(), wpet->GetLastGM(), petitiontext, wpet->GetZone(), wpet->GetUrgency(), wpet->GetCharClass(), wpet->GetCharRace(), wpet->GetCharLevel(), wpet->GetCheckouts(), wpet->GetUnavails(), checkedout, wpet->GetSentTime(), wpet->GetGMText()), errbuf, 0, &affected_rows)) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in InsertPetitionToDB query '%s': %s", query, errbuf);
|
||||
}
|
||||
|
||||
|
||||
safe_delete_array(petitiontext);
|
||||
safe_delete_array(query);
|
||||
#if EQDEBUG >= 5
|
||||
@@ -312,6 +312,6 @@ void ZoneDatabase::RefreshPetitionsFromDB()
|
||||
safe_delete_array(query);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user