Fixed attriutes not sending

This commit is contained in:
PEMapModder
2016-02-11 18:45:58 +08:00
parent 28967ca495
commit 8807617480
6 changed files with 29 additions and 10 deletions

View File

@ -73,7 +73,7 @@ class Attribute{
*
* @return Attribute
*/
public static function addAttribute($id, $name, $minValue, $maxValue, $defaultValue, $shouldSend = false){
public static function addAttribute($id, $name, $minValue, $maxValue, $defaultValue, $shouldSend = true){
if($minValue > $maxValue or $defaultValue > $maxValue or $defaultValue < $minValue){
throw new \InvalidArgumentException("Invalid ranges: min value: $minValue, max value: $maxValue, $defaultValue: $defaultValue");
}
@ -105,7 +105,7 @@ class Attribute{
return null;
}
private function __construct($id, $name, $minValue, $maxValue, $defaultValue, $shouldSend = false){
private function __construct($id, $name, $minValue, $maxValue, $defaultValue, $shouldSend = true){
$this->id = (int) $id;
$this->name = (string) $name;
$this->minValue = (float) $minValue;