diff --git a/doc/Avatar.py b/doc/Avatar.py index 6e1a6a41..62ef3855 100644 --- a/doc/Avatar.py +++ b/doc/Avatar.py @@ -42,6 +42,7 @@ class Avatar(object): ], 'response': [ _common.RspHead(), + ['property_chg', _common.PropertyChg(), '属性变更'], ] },{ 'name': 'buyAvatar', @@ -66,6 +67,7 @@ class Avatar(object): ], 'response': [ _common.RspHead(), + ['property_chg', _common.PropertyChg(), '属性变更'], ] },{ 'name': 'clearAvatar', @@ -78,6 +80,7 @@ class Avatar(object): ], 'response': [ _common.RspHead(), + ['property_chg', _common.PropertyChg(), '属性变更'], ] }, ] diff --git a/webapp/controller/AvatarController.class.php b/webapp/controller/AvatarController.class.php index 3062a41e..1f873185 100644 --- a/webapp/controller/AvatarController.class.php +++ b/webapp/controller/AvatarController.class.php @@ -74,7 +74,11 @@ class AvatarController extends BaseAuthedController { } Avatar::equipUpdate($avatarDb,$heroUniid); - $this->_rspOk(); + $propertyChgService = new services\PropertyChgService(); + $propertyChgService->addHeroChg(); + $this->_rspData(array( + 'property_chg' => $propertyChgService->toDto(), + )); } public function remove(){ @@ -89,7 +93,11 @@ class AvatarController extends BaseAuthedController { 'status' => 0, 'modifytime' => myself()->_getNowTime(), )); - $this->_rspOk(); + $propertyChgService = new services\PropertyChgService(); + $propertyChgService->addHeroChg(); + $this->_rspData(array( + 'property_chg' => $propertyChgService->toDto(), + )); } public function clearAvatar(){ @@ -111,7 +119,11 @@ class AvatarController extends BaseAuthedController { 'modifytime' => myself()->_getNowTime(), )); } - $this->_rspOk(); + $propertyChgService = new services\PropertyChgService(); + $propertyChgService->addHeroChg(); + $this->_rspData(array( + 'property_chg' => $propertyChgService->toDto(), + )); }