Skip to content

Instantly share code, notes, and snippets.

View Romain-P's full-sized avatar
🈴
/home

- Romain-P

🈴
/home
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include "simple_list.h"
unsigned int list_get_size(list_t list)
{
int i = 0;
if (list)
i = 1;
void main()
{
decimale_op_t dot = {5, 2, 0};
div_t divt = {DECIMALE, &dot};
exec_div(&divt);
printf("got %f\n", ((decimale_op_t *)divt.div_op)->res);
}
static int pyramid_path_alt(int size, int **map, int x, int y)
{
if (y == size - 1)
return (map[y][x]);
int a = pyramid_path_alt(size, map, x, y + 1);
int b = pyramid_path_alt(size, map, x + 1, y + 1);
int choosen = a < b ? a : b;
return (map[y][x] + choosen);
@Romain-P
Romain-P / script.lua
Last active December 27, 2017 14:13
Fix for feature <<Always-Facing>> - The character dont move anymore while being stunned
if not defined then defined = true
ewt_user = true
got_control = true -- to know if the player is stun or not
-- all pvp stun ids
StunList = {
20066,6770,8122,1776,108194,89766,113801,117526,119392,1833,44572,105593,117418,120086,47481,853,19577,24394,408,119381,22570,5211,
91797,64044,118345,163505,115001,30283,132168,46968,118905,132169,34510,131402,123420,20549,103828
}
@Romain-P
Romain-P / Java7.java
Created October 26, 2017 12:30
what's the most maintainable? ;")
for (...) {
Class found = null;
for (Class i: bc.getInterfaces()) {
if (i == requestClass) {
success.add(new RetrievedBinding(requestClass, bc.getInstance(), bd.named(), bd.singleton()));
found = i;
break;
# Disables RawDataMessage signature checking for Dofus2
---
classPath: com.ankamagames.dofus.logic.common.frames.ServerControlFrame
method: process
before: 2
rpattern:
- getproperty Qname\(PackageNamespace\(""(,"[0-9]+")?\),"content"\)
This file has been truncated, but you can view the full file.
INFO |- 25/10/2017 01:18:35.284 | [SERVER] 213.248.126.71:5555 -> 192.168.8.100:55540 : New tcp session direction
INFO |- 25/10/2017 01:18:35.284 | [SERVER] 213.248.126.71:5555 -> 192.168.8.100:55540 : GameMapMovementMessage(keyMovements=[125, 165], forcedDirection=3, actorId=-20002.0) (16 bytes)
INFO |- 25/10/2017 01:18:39.965 | [CLIENT] 192.168.8.100:55540 -> 213.248.126.71:5555 : New tcp session direction
INFO |- 25/10/2017 01:18:39.965 | [CLIENT] 192.168.8.100:55540 -> 213.248.126.71:5555 : GameMapMovementRequestMessage(keyMovements=[20591, 16408, 16401], mapId=8.4806402E7) (64 bytes)
INFO |- 25/10/2017 01:18:40.020 | [SERVER] 213.248.126.71:5555 -> 192.168.8.100:55540 : BasicAckMessage(seq=2754, lastPacketId=950) (4 bytes)
INFO |- 25/10/2017 01:18:40.020 | [SERVER] 213.248.126.71:5555 -> 192.168.8.100:55540 : GameMapMovementMessage(keyMovements=[111, 97, 82, 68, 53, 39, 24, 23, 22, 21, 20, 19, 18, 17], forcedDirection=4, actorId=4.41113575633E11) (40 bytes)
INFO |- 25/10/2017 01:18:43.047 | [CLIEN
package org.heat.dofus;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.heat.dofus.network.DataSigner;
import java.util.Arrays;
import java.util.Base64;
/**
import {config} from "../app.config";
import {Buffer} from 'buffer/';
import * as crypto from "crypto-browserify";
export class RsaService {
private publicKey: string;
private enabled: boolean;
constructor() {
//BEP format required by crypto
package org.heat.dofus.network;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.fungsi.Try;
import org.heat.dofus.network.netty.NettyDataReader;
import org.heat.dofus.network.netty.NettyDataWriter;
import org.heat.shared.Md5;
import org.heat.shared.RsaHandler;