플레이어 클래스 정보
const
// 캐릭터의 상태 SetState( AState: Integer;... State인자.
PLSSITDOWN = 0; //앉기
PLSSTANDUP = 1; //서기
PLSWALK = 2; //걷기
PLSRUN = 3; //달리기
PLSRENEW = 4; //캐릭터 재 시작
MAXABILITY = 100; //최대 가질 수 있는 스킬의 개수
//레벨을 올릴 스탯의 종류
SUP_LEVEL = 0; //레벨 올리기
SUP_HP = 1; //MaxHP올리기
SUP_MP = 2; //MaxMP올리기
SUP_IP = 3; //IP 올리기
SUP_PP = 4; //PP올리기
SUP_SP = 5; //SP올리기
CHPREGENTIME = 3000;
CHPREGENVALUE = 1;
CMPREGENTIME = 5000;
CMPREGENVALUE = 2;
type
TGPlayer = class(TGMovable)
protected
FUName : String;
FJob : Byte;
FLevel : SmallInt;
FJobBase : TJobBase;
FRunState : Integer;
FSex : Byte;
FIP : Integer;
FPP : Integer;
FSP : Integer;
FBAttack : Integer;
FBDefence : Integer;
FBPrecision : Integer;
FBDodge : Integer;
FHPRgnTime : DWORD;
FHPRgnValue : Integer;
FMPRgnTime : DWORD;
FMPRgnValue : Integer;
FCurHPRgnTime : DWORD;
FCurMPRgnTime : DWORD;
FEther : Integer;
FKarma : Integer;
FKarmaPoint : Integer;
FZone : SmallInt;
FAbilities : TList;
FInventory: TGFortune;
function AddAbility( AAbility: TAbility ): Boolean;
function RemoveAbility( AAbility: TAbility ): Boolean;
function FindAbility( ID : Integer ): TAbility;
public
function GetKind: Byte; override;
function GetSpeed: Integer; override;
function GetJob: Integer; override;
constructor Create;
destructor Destroy; override;
procedure Init( ID, UserName : String; Sex : Integer;
AHead, ABody, AWeapon: TUserItem; IncHP, IncMP, IncPP, IncIP, IncSP: Integer );
procedure LoadFromDataSet( DS: TDataSet ); // DB에 저장되어 있는 캐릭터 정보 읽기..
function GetInsertSQL: String;
function GetUpdateSQL: String;
procedure SetAbility( AAbility: TAbility );
function LearnAbility( AAbility: TAbility ): Boolean;
procedure ClearAbilities;
procedure WriteToBuffer( var buf : String );
procedure MoveZone( AZone: Integer; AX, AY, AZ: Extended );
function Attack(Target: TGMovable; AttackType: Integer): Boolean; override;
procedure Defence( Attacker: TGMovable; AAbility: TAbility; StrikePoint : Integer ); override;
procedure AddEther( Value: Integer ); override;
function UseAbility( Target: TGMovable; AbilType: Integer ): Boolean;
function AppliedAbility( Sender: TGMovable; AAbility: TAbility; StrikePoint : Integer ): Boolean;
function SetState( AState: Integer; AX, AY, AZ: Extended ): Boolean;
function RegenValues: Boolean;
function LevelUp( AJobData: TJobData; IncSTA: Integer ): Boolean;
function ChangeJob( AJobData: TJobData ): Boolean;
{
procedure update; // 수정된 캐릭터 정보 저장하기..
procedure SetClassInit( AClassName : String );
procedure ChangeZone( ZoneName : String );
//캐릭터 존이동 존이름
procedure returnUserChar;
//캐릭터의 현재 상태값 전달..
}
property UName: String read FUName;
property Job : Byte read FJob;
property Level : SmallInt read FLevel;
property Sex : Byte read FSex;
property IP : Integer read FIP;
property PP : Integer read FIP;
property SP : Integer read FSP;
property BAttack : Integer read FBAttack;
property BDefence : Integer read FBDefence;
property BPrecision : Integer read FBPrecision;
property BDodge : Integer read FBDodge;
property HPRgnTime : DWORD read FHPRgnTime;
property HPRgnValue : Integer read FHPRgnValue;
property MPRgnTime : DWORD read FMPRgnTime;
property MPRgnValue : Integer read FMPRgnValue;
property Ether : Integer read FEther;
property Karma : Integer read FKarma;
property KarmaPoint : Integer read FKarmaPoint;
property Zone : SmallInt read FZone;
property Abilities: TList read FAbilities;
property Fortune: TGFortune read FInventory;
end;
var
JOBNAMES : array[0..28] of String = (
'아스카', '워리어', '로그', '매지션', '어콜라이트',
'패러딘', '글라디에이터', '팬텀화이터', '어세신', '헌터',
'나이트호크', '드루이드', '위자드', '네크로맨서', '세이지',
'몽크', '프리스트', '미라쥬나이트', '베르세르카', '다크나이트',
'나이트쉐이드','아케인레인저','벤티드캡틴','드루이드마스터','아크메이지',
'사타나키아','세라피스트','메네딕투스','하이프리스트');
History
Last edited on 05/01/2007 18:05 by 꿈꾸는자
Comments (0)