Portal Class ReferenceDatabase table Chunkinfo, specialization Portal.
More...
|
Public Member Functions | |
Portal (Database &, Chunk &) | |
Portal (Database &, Chunk &, int x, int y) | |
~Portal () | |
void | SetToArea (int) |
void | SetToChunk (int) |
void | SetToX (int) |
void | SetToY (int) |
int | GetToArea () |
int | GetToChunk () |
int | GetToX () |
int | GetToY () |
void | Display (InSocket *) |
Definition at line 30 of file Portal.h.
Portal::Portal | ( | Database & | , | |
Chunk & | ||||
) |
Portal::Portal | ( | Database & | , | |
Chunk & | , | |||
int | x, | |||
int | y | |||
) |
Definition at line 32 of file Portal.cpp.
00032 : Chunkinfo(db, chunk, x, y, TYPE_PORTAL) 00033 { 00034 }
Portal::~Portal | ( | ) |
void Portal::SetToArea | ( | int | ) |
Definition at line 42 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Chunk::AddPortal().
00043 { 00044 m_chunkinfo -> to_area = x; 00045 }
void Portal::SetToChunk | ( | int | ) |
Definition at line 48 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Chunk::AddPortal().
00049 { 00050 m_chunkinfo -> to_chunk = x; 00051 }
void Portal::SetToX | ( | int | ) |
Definition at line 54 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Chunk::AddPortal().
00055 { 00056 m_chunkinfo -> to_x = x; 00057 }
void Portal::SetToY | ( | int | ) |
Definition at line 60 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Chunk::AddPortal().
00061 { 00062 m_chunkinfo -> to_y = x; 00063 }
int Portal::GetToArea | ( | ) |
Definition at line 66 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Display().
00067 { 00068 return m_chunkinfo -> to_area; 00069 }
int Portal::GetToChunk | ( | ) |
Definition at line 72 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Display().
00073 { 00074 return m_chunkinfo -> to_chunk; 00075 }
int Portal::GetToX | ( | ) |
Definition at line 78 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Display().
00079 { 00080 return m_chunkinfo -> to_x; 00081 }
int Portal::GetToY | ( | ) |
Definition at line 84 of file Portal.cpp.
References Chunkinfo::m_chunkinfo.
Referenced by Display().
00085 { 00086 return m_chunkinfo -> to_y; 00087 }
void Portal::Display | ( | InSocket * | ) | [virtual] |
Reimplemented from Chunkinfo.
Definition at line 90 of file Portal.cpp.
References Chunkinfo::Exists(), GetToArea(), GetToChunk(), GetToX(), GetToY(), and Player::IsWizard().
00091 { 00092 if (!Exists()) 00093 return; 00094 Player pl(from -> GetDatabase(),from -> GetAccountName()); 00095 from -> Send(" You see a portal.\n"); 00096 if (pl.IsWizard()) 00097 { 00098 from -> Sendf(" [&gToArea:&W%ld&n &gToChunk:&W%ld&n &gToX:&W%d&n &gToY:&W%d&n]\n", 00099 GetToArea(), GetToChunk(), GetToX(), GetToY()); 00100 } 00101 }