Skip to content

Commit

Permalink
*Reverted otserv trunk to revision 6131 , removed all of the hackerpo…
Browse files Browse the repository at this point in the history
…tato changes he did allowed me to do so .

*Added all of the revisions of other developers that has made changes to otserv trunk after 6131 code except r.6205 because it was working fine before hackerpotato changes(tested it).
*It should fix all of the errors reported on otserv bug report(recently reported) and otserv should be again stable .
*Please do not commit broken code otserv latest revision wasn't useable/stable for like 2 months !
*I tested compiling under linux and windows now vc10 and makefile and premake are the only supported projects (it was like that before that rev )most of the other ones wasn't used anyway ...


git-svn-id: https://opentibia.svn.sourceforge.net/svnroot/opentibia/otserv/trunk@6224 c77455bc-2124-0410-8220-ac9e7aafbb94
  • Loading branch information
pietia10 committed Feb 5, 2012
1 parent 65e8ad7 commit 3a3ad94
Show file tree
Hide file tree
Showing 160 changed files with 20,201 additions and 36,100 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ EXTRA_DIST=autogen.sh \


otserv_SOURCES = $(MAYBE_MYSQL) $(MAYBE_SQLITE) $(MAYBE_ODBC) $(MAYBE_PGSQL) \
account.cpp map.cpp rsa.cpp \
map.cpp rsa.cpp \
actions.cpp md5.cpp scheduler.cpp \
admin.cpp monster.cpp scriptmanager.cpp \
allocator.cpp depot.cpp monsters.cpp server.cpp \
Expand All @@ -68,7 +68,7 @@ otserv_SOURCES = $(MAYBE_MYSQL) $(MAYBE_SQLITE) $(MAYBE_ODBC) $(MAYBE_PGSQL) \
ioaccount.cpp outputmessage.cpp tasks.cpp \
condition.cpp iomapotbm.cpp party.cpp teleport.cpp \
configmanager.cpp iomapserialize.cpp player.cpp thing.cpp \
connection.cpp position.cpp tile.cpp town.cpp\
connection.cpp position.cpp tile.cpp \
container.cpp ioplayer.cpp protocol.cpp tools.cpp \
creature.cpp item.cpp protocolgame.cpp trashholder.cpp \
creatureevent.cpp items.cpp protocollogin.cpp vocation.cpp \
Expand Down
40 changes: 0 additions & 40 deletions account.cpp

This file was deleted.

19 changes: 14 additions & 5 deletions account.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,37 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////


#ifndef __OTSERV_ACCOUNT_H__
#define __OTSERV_ACCOUNT_H__

#include "definitions.h"
#include <vector>
#include <list>
#include <string>
#include <ctime>
#include <cmath>

class Account
{
public:
Account();
Account() : number(0), warnings(0), premEnd(0){}
~Account(){}

static uint16_t getPremiumDaysLeft(const int32_t& _premEnd);
static uint16_t getPremiumDaysLeft(int32_t _premEnd)
{
if(_premEnd < time(NULL)){
return 0;
}
return (uint16_t)std::ceil(((double)(_premEnd - time(NULL))) / 86400.);
}

uint32_t number;
uint32_t warnings;
std::string name;
std::string password;

time_t premEnd; // < current time is none, (time_t)(-1) is infinite.
std::vector<std::string> characters;
std::list<std::string> charList;
};

#endif // __OTSERV_ACCOUNT_H__
#endif // #ifndef __ACCOUNT_H__
Loading

0 comments on commit 3a3ad94

Please sign in to comment.