//
//  ObjectMessageRequest.m
//  SFS2X
//
//  Original development by Infosfer Game Technologies Ltd. | http://www.infosfer.com.
//
//  Maintained and developed by A51 Integrated.
//  Copyright 2012 A51 Integrated | http://a51integrated.com. All rights reserved.
//

#import "ObjectMessageRequest.h"
#import "GenericMessageType.h"

@implementation ObjectMessageRequest

-(id)initWithObject:(id <ISFSObject>)obj targetRoom:(id <Room>)targetRoom recipients:(NSArray *)recipients {
	
	if ((self = [super init])) {
		_type = GenericMessageType_OBJECT_MSG;
		self.params = obj;
		self.room = targetRoom;
		self.recipient = recipients;
	}
	return self;
}

+(id)requestWithObject:(id <ISFSObject>)obj targetRoom:(id <Room>)targetRoom recipients:(NSArray *)recipients {
	ObjectMessageRequest *req = [[ObjectMessageRequest alloc] initWithObject:obj targetRoom:targetRoom recipients:recipients];
	return req;
}

+(id)requestWithObject:(id <ISFSObject>)obj {
	ObjectMessageRequest *req = [[ObjectMessageRequest alloc] initWithObject:obj targetRoom:nil recipients:nil];
	return req;
}

@end
