def buy(request): server_id = request._game_session.server_id char_id = request._game_session.char_id tp = request._proto.tp goods_id = request._proto.goods_id s = Store(server_id, char_id) drop = s.buy(tp, goods_id) response = StoreBuyResponse() response.ret = 0 response.drop.MergeFrom(drop.make_protomsg()) return ProtobufResponse(response)
def buy(request): s = Store() return s.buy(request.POST)
def buy(request): s = Store(request._char_id) s.buy(request._proto.id, request._proto.amount) return None