-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PalaceRoom.js and PalaceChatRecord.js
started handling talk and xtalk packets
- Loading branch information
Showing
5 changed files
with
157 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
This file is part of OpenPalace. | ||
OpenPalace 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, either version 3 of the License, or | ||
(at your option) any later version. | ||
OpenPalace is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; 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 OpenPalace. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package net.codecomposer.palace.model | ||
{ | ||
[Bindable] | ||
public class PalaceRoom | ||
{ | ||
public var name:String; | ||
public var id:int; | ||
public var flags:int; | ||
public var userCount:int; | ||
|
||
public function PalaceRoom() | ||
{ | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
This file is part of OpenPalace. | ||
OpenPalace 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, either version 3 of the License, or | ||
(at your option) any later version. | ||
OpenPalace is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; 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 OpenPalace. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
//package net.codecomposer.palace.model | ||
//{ | ||
/* \[Bindable\] */ | ||
function PalaceRoom() | ||
{ | ||
this.constants = {}; | ||
var name = this.name/* :String */; | ||
var id = this.id/* :int */; | ||
var flags = this.flags/* :int */; | ||
var userCount = this.userCount/* :int */; | ||
|
||
var PalaceRoom = this.PalaceRoom = function() | ||
{ | ||
} | ||
|
||
} | ||
//} | ||
|
||
module.exports = PalaceRoom; | ||
var PalaceRoomVar = new PalaceRoom(); | ||
for (name in PalaceRoomVar.constants) { | ||
module.exports[name] = PalaceRoomVar.constants[name]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package net.codecomposer.palace.record | ||
{ | ||
import org.openpalace.iptscrae.IptTokenList; | ||
|
||
public class PalaceChatRecord | ||
{ | ||
public static const INCHAT:int = 0; | ||
public static const OUTCHAT:int = 1; | ||
|
||
public var direction:int; | ||
public var whochat:int; | ||
public var whotarget:int; | ||
public var chatstr:String; | ||
public var whisper:Boolean; | ||
public var eventHandlers:Vector.<IptTokenList>; | ||
private var _originalChatstr:String; | ||
|
||
public function PalaceChatRecord(direction:int = INCHAT, whochat:int = 0, whotarget:int = 0, chatstr:String = "", isWhisper:Boolean = false) | ||
{ | ||
this.direction = direction; | ||
this.whochat = whochat; | ||
this.whotarget = whotarget; | ||
this.chatstr = chatstr; | ||
this.whisper = isWhisper; | ||
this._originalChatstr = chatstr; | ||
} | ||
|
||
public function get originalChatstr():String { | ||
return _originalChatstr; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//package net.codecomposer.palace.record | ||
//{ | ||
// import org.openpalace.iptscrae.IptTokenList; | ||
|
||
function PalaceChatRecord() | ||
{ | ||
this.constants = {}; | ||
var INCHAT = this.constants.INCHAT/* :int */ = 0; | ||
var OUTCHAT = this.constants.OUTCHAT/* :int */ = 1; | ||
|
||
var direction = this.direction/* :int */; | ||
var whochat = this.whochat/* :int */; | ||
var whotarget = this.whotarget/* :int */; | ||
var chatstr = this.chatstr/* :String */; | ||
var whisper = this.whisper/* :Boolean */; | ||
var eventHandlers = this.eventHandlers/* :Vector.<IptTokenList> */; | ||
var _originalChatstr/* :String */; | ||
|
||
var PalaceChatRecord = this.PalaceChatRecord = function(direction/* :int */ , whochat/* :int */ , whotarget/* :int */ , chatstr/* :String */, isWhisper/* :Boolean */) | ||
{ | ||
this.direction = direction || INCHAT; | ||
this.whochat = whochat || 0; | ||
this.whotarget = whotarget || 0; | ||
this.chatstr = chatstr || ""; | ||
this.whisper = isWhisper || false; | ||
this._originalChatstr = chatstr; | ||
} | ||
|
||
var get_originalChatstr = this.get_originalChatstr = function()/* :String */ { | ||
return _originalChatstr; | ||
} | ||
} | ||
//} | ||
|
||
module.exports = PalaceChatRecord; | ||
var PalaceChatRecordVar = new PalaceChatRecord(); | ||
for (name in PalaceChatRecordVar.constants) { | ||
module.exports[name] = PalaceChatRecordVar.constants[name]; | ||
} |